Search results

  1. JohnH

    Question how to use file from website

    Network.DownloadFile Method (Microsoft.VisualBasic.Devices) | Microsoft Docs Second parameter to DownloadFile is destinationFileName, that is the path to where you want to download the file to.
  2. JohnH

    Answered Web Access in code

    We leave threads open here, but thanks for letting us know you found the answer useful.
  3. JohnH

    Answered Web Access in code

    Close the StreamReader (or put it in Using block), that will also close the response stream it is reading from, so that is the only call that is needed. What to look out for in .Net is disposable objects, they implement IDisposable interface with a Dispose method. Some of these also have Close...
  4. JohnH

    ASCII Code of Currency Symbol unexpectedly changed

    When you don't specify encoding it uses UTF-8 without a BOM to the start of file, when you specify UTF-8 encoding it adds that BOM. It explained in constructor remarks I linked to. I don't know what encoding Cobol source code is expexted to be in. From some web reading I find Windows codepage...
  5. JohnH

    ASCII Code of Currency Symbol unexpectedly changed

    Default output encoding of StreamWriter is UTF-8, look at the constructors and use one that specifies the encoding you want. StreamWriter Constructor (System.IO) | Microsoft Docs
  6. 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...
  7. 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.
  8. JohnH

    Drag and drop PDF

    That's what you're supposed to do with the file path.
  9. 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
  10. 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...
  11. 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.
  12. 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.
  13. 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...
  14. 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.
  15. 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...
  16. 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...
  17. 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 =...
  18. 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...
  19. 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...
  20. 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...
Top Bottom