• I removed the www from the URL, please update your bookmarks and pay attention to the bottom of the screen if using Google Chrome to allow push notifications again.

Search results

  1. JohnH

    retrieval of XML information & Copy to excel Files Pin

    I fixed the code formatting, just copy in Visual Studio and paste in the code box editor and indenting will be preserved. There is no PartNumber node, that is an attribute of the Tool node. Further, ToolLine nodes are children of the Tool node. I recommend you use the newer xml tools with...
  2. JohnH

    Drag and drop PDF

    You will only get the file path with a drag-drop operation. What to do with that file next is up to you, there is no built in code or functionality do one or the other with any particular file.
  3. JohnH

    Drag and drop PDF

    That's what you're supposed to do with the file path.
  4. JohnH

    Drag and drop PDF

    When you drop a file you will get the file path, see here for example: How to provide file drag-and-drop functionality in a Visual Basic 2005 or Visual Basic .NET application
  5. JohnH

    Problem with visual studio licence

    I got that too with VS 2019 Community about 30 days after I installed it, I clicked something in account settings and was renewed same as you. I think it happened only on a machine I had uninstalled VS 2017 first. It says to sign in here if you get that message: Community Edition expired. Do I...
  6. JohnH

    Form Inheritance error with global variables in Form_Load

    Form designer tries to load the form, and designer doesn't press that button to do it :) You could check If variable is Nothing before using it, or move the code to a separate method that you call from button.
  7. JohnH

    Form Inheritance error with global variables in Form_Load

    In Form1 Load event you have this code: Dim lst As IList = gReqInfo.getMyData("name") gReqInfo is defined in ModSystem: Public gReqInfo As RequestInfo Nowhere have you created an instance of RequestInfo and assigned to gReqInfo, therefore Form1 cannot load and Form2 cannot be designed.
  8. JohnH

    Question how to ensure about sending multiple serial data from server to client

    For BeginRead you need a buffer with some size and request to read a number of bytes greater than 0 (and limited by buffer size). For read callback you need two items, the NetworkStream to call EndRead and the byte buffer that was filled with data. For example you could have this variable...
  9. JohnH

    Releasing resources

    Many objects are automatically disposed when application closes, for example the main form and all objects there. Then CLR unloads the AppDomain that it created when application started, and that includes any cleanup that was left undone when application was running.
  10. JohnH

    Speech recognition program - need conceptual approach

    It's not my example, it's from the MSDN Magazine article I posted. Read about Confidence here: RecognizedPhrase.Confidence Property (System.Speech.Recognition) | Microsoft Docs As explained, Confidence is not an absolute value, but a relative one that can be compared with Confidence of other...
  11. JohnH

    Resolved How to Search and find control with the .tag (over all forms in project), show control flashing on related form.

    You can clean that code up a bit, and can also use the My.Forms object to loop the forms of the project. This has the difference that while your code creates new form instances for each search, the My.Forms only returns a single instance. This also means that if found form is not closed between...
  12. JohnH

    Question Use Accounting format in Datagridview

    Here's an example of that, if you add these classes to project the column can be added directly in Columns editor in designer: Public Class AccountingColumn Inherits DataGridViewTextBoxColumn Public Sub New() CellTemplate = New AccountingCell DefaultCellStyle.Alignment =...
  13. JohnH

    Speech recognition program - need conceptual approach

    The example is in C#, there are some semicolons and curly brackets but it's not very different from VB. Look up a C# VB converter online and you get VB sample code. For instance taking the first find Code Converter C# to VB and VB to C# – Telerik I get this Imports System Imports...
  14. JohnH

    Speech recognition program - need conceptual approach

    I have not worked with speech recognition, but have read some articles from time to another, I found this with a seach now: Voice Recognition - Speech Recognition with .NET Desktop Applications The example here is similar to what you ask, it has start-stop commands in one grammar and other...
  15. JohnH

    Question Sorting a List in a RichTextBox by the Date Inside

    If you already have the lines (from your data or from RichTextBox), you can use Linq and Regex to sort them. Regex may depend on what the preceding strings can be, but if the 4 year digits is exclusive it can be done like this: Dim sorted = From line In lines Order By CInt(Regex.Match(line...
  16. JohnH

    Properly Using Dispose

    No, it disposes the managed Graphics object and also releases unmanaged GDI+ resources associated with this object. It is the bmp.Dispose call that releases the file, since it was loaded from a file. Yes. If g references an object and you assign a new object to g, then you no longer have...
  17. JohnH

    Resolved Error when trying to install Microsoft Code Analysis 2017

    I can see this has been reported: Microsoft Code Analysis 2017 - Visual Studio Marketplace (Q&A) Microsoft.CodeAnalysis.FxCopAnalyzers does not install in VS2019 RC - Developer Community
  18. JohnH

    Problem with counting in threads

    Using SyncLock on totalA += assignment should probably be done here, or using thread-safe Add method in structure with totalA.Add(TestCount.CountFile(file)) in loop. Public Sub Add(value As TestCount) Threading.Interlocked.Add(Lines, value.Lines) End Sub
  19. JohnH

    My.Resources

    If you access one resource in resources the whole resource set is loaded in memory and cached for later, subsequent access is very fast from memory. Depending on usage you may want to cache items locally yourself to avoid creating new objects each time a resource is retrieved.
  20. JohnH

    Problem with counting in threads

    I have this sample structure that holds linecount of a file: Private Structure TestCount Public Property Lines As Integer Public Shared Function CountFile(file As String) As TestCount Return New TestCount With {.Lines = IO.File.ReadAllLines(file).Count} End Function...
Top Bottom