Sign up to connect with xrjf and gain access to their complete profile
  • Member Avatar
    xrjf

    Replied To a Post in VB.net Check datatable for an existing account number

    I imagine you are aware of SQL injection. If not you may read [here](https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection?view=sql-server-2017) about it.
  • Member Avatar
    xrjf

    Began Watching VB.net Check datatable for an existing account number

    Hi group, I'm attempting to write code to check to see if an existing account number exists. The user is to input a 10 digit account number. The code then …
  • Member Avatar
    xrjf

    Replied To a Post in Why is the ListView box showing same headings twice?

    One question: where do you define `itemcoll`?
  • Member Avatar
    xrjf

    Began Watching Why is the ListView box showing same headings twice?

    Group, I've written some code to populate a listview using 3 fields from a database. When creating the listview, I named the individual columns for appearance purposes, (Account No, Company …
  • Member Avatar
    xrjf

    Replied To a Post in How do I disconnect wi-fi

    Take a look [Here](https://www.windows-commandline.com/disable-wifi-connection/)
  • Member Avatar
    xrjf

    Began Watching How do I disconnect wi-fi

    I have the following code to connect to wi-fi, which works fine. Dim p = "netsh.exe" Dim wi-fi-name as string = "My-Wi-Fi-Connection" Dim sInfo As New ProcessStartInfo(p, "wlan connect " …
  • Member Avatar
    xrjf

    Replied To a Post in Not declared errors in VS 2017

    I see tag `<asp:Panel` in line #9 open but never closed, is it?
  • Member Avatar
    xrjf

    Replied To a Post in adding text to a text file using vb.net

    Sorry for the inconvient. There were extra lines not needed. Sub Main() Try prependTextToAllLines("Append.txt") Console.Write("Process succeeded. Press Enter key to exit.") Console.ReadLine() Catch ex As Exception Console.WriteLine(ex.ToString) Console.ReadLine() End Try …
  • Member Avatar
    xrjf

    Replied To a Post in adding text to a text file using vb.net

    For some reason I don' t know, yesterday the code was working and today it fails. So, I've rewritten the code and it is: Sub Main() Try prependTextToAllLines("Append.txt") Catch ex …
  • Member Avatar
    xrjf

    Replied To a Post in adding text to a text file using vb.net

    @rproffitt: If the file is large and assuming we can buffer a first bunch of lines so that streamreader and streamwriter will never overlap: Try Dim path As String = …
  • Member Avatar
    xrjf

    Replied To a Post in adding text to a text file using vb.net

    Consider reading all the lines at the beginning and, then, prepending the line number, like in: Try Dim vLines() As String = IO.File.ReadAllLines("Append.txt") Using sw As New StreamWriter("Append.txt") For i …
  • Member Avatar
    xrjf

    Began Watching adding text to a text file using vb.net

    i want to add some text at the begining of every line in a text file. i'm only able to append text to the file Imports System.IO Module Module1 Sub …
  • Member Avatar
    xrjf

    Replied To a Post in Not declared errors in VS 2017

    Be sure to have all the tags 'closed' (e.g. `<asp:Panel ... />` or `<asp:Panel .... > ....</asp:Panel>`) and all enclosed inside `<form>...</form>`. For example: <body> <form id="form1" runat="server"> <div> <asp:Label …
  • Member Avatar
    xrjf

    Began Watching Not declared errors in VS 2017

    Hello I am getting 3 errors (same errors for all 3 lines) in my Visual Studio 2017 Web Forms project: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) …
  • Member Avatar
    xrjf

    Replied To a Post in Datagridview Control class

    Unexpectedly for me, when datasource is assigned, dessing mode seems to be bypassed. Commenting the `If` condition columns and rows can added to the datatable, directly to the control in …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    Still the code was throwing exceptions until the function shifted to a shared function and the code was as below. Now it works smoothly. Shared Function SearchComPort(obj As sComObj) As …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    I continue this thread because actually I've re-written some C# code, that communicates with a usb device, in Visual Basic. The thing is that when trying to find the COM …
  • Member Avatar
    xrjf

    Replied To a Post in vb.net - IP-Input-Box like windows

    I adjoint the project once again because I found it was throwing errors, did you find any? If you find any further error please let me know. ![IP_Textbox3.PNG](/attachments/large/3/df4e7d2c6df13bfb26c01034e9081709.PNG)
  • Member Avatar
    xrjf

    Began Watching Help! Search Button code error in vb.net

    Please tell what's wrong in this code.. I am using 3 DateTimePicker.. I think that line has some problem...Please Help.. ![Untitled.jpg](/attachments/large/4/f42d519e8bc5ead2edc0bf81395f227c.jpg)
  • Member Avatar
    xrjf

    Replied To a Post in Search Button Error-System Null Reference Exception

    To get error line number I would enclose inside a try-catch.
  • Member Avatar
    xrjf

    Began Watching Search Button Error-System Null Reference Exception

    "Error in Line 4- System.NullReferenceException: 'Object reference not set to an instance of an object." Private Sub btnsearch3_Click(sender As Object, e As EventArgs) Handles btnsearch3.Click Dim vSearch As String = …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    I am very happy that you could resolve the issue. Thanks.
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    There should be no problem by name. Could you upload an image of the Console listing the name (option 2.) ? Use the snipping tool for that purpose.
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    ┬┐Are you entering the complete name? The select command is NOT case sensitive, but if you want to use the percent wildcard '%', the function would be then: Function Find_Device_By_Name(name …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    BTW you may cast from one type to another by means of `DirectCast()` or `CType()`.
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    Vendor ID (VID) and Product (ID) is not the same as serial number. Two equal devices from the same vendor will have the same VID & PID because are the …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    I imagine you'll want to know if the mouse is attached or removed. Here is another version where this task is done (in option 3). Imports System.Management Module Module1 Dim …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    As you may know, each device has a unique Vendor Identifier (VID) and a Product Identifier (PID). If, for example, I want to know if the mouse is connected, what …
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    You should know by now or take a programming course: call the function passing the name of the device as argument.
  • Member Avatar
    xrjf

    Replied To a Post in show connected USB Devices

    In Visual Studio go to the Solution Explorer and right click over "References". It will look something like this: ![ListDevices0.PNG](/attachments/large/3/b3733cf4893ecf965f0c2a9a39f2cb80.PNG) A dialog window will be opened. Select "Framework" on the …

The End.