Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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 …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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 …

Programming
Member Avatar

Hello,

I want to have a manual IP-input-box like windows.

tcpip_properties.gif

I tried by MaskedTextBox but the problem is, the 3 pionts are sliding when i insert some numbers and …

Topic by joshi1984

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

Software Development
Member Avatar

Please tell what's wrong in this code.. I am using 3 DateTimePicker.. I think that line has some problem...Please Help..

Untitled.jpg

Software Development
Member Avatar
        "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 = …
Topic by Jagruti22

To get error line number I would enclose inside a try-catch.

Software Development
Member Avatar
        "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 = …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

I am very happy that you could resolve the issue. Thanks.

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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.

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

┬┐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 …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

BTW you may cast from one type to another by means of DirectCast() or CType().

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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 …

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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 …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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 …

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

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

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

In Visual Studio go to the Solution Explorer and right click over "References". It will look something like this:

ListDevices0.PNG

A dialog window will be opened. Select "Framework" on the …

Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

If you want to list only USB devices, you may do:

    Function DetectDevice(DeviceName As String) As Boolean
        Try
            ' See if the desired device shows up in the device manager.' …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Topic by joshi1984

Click Here
You should add a reference to System.Management dll

    Function DetectDevice(DeviceName As String) As Boolean
        Try
            ' See if the desired device shows up in the device manager.'
            Dim …
Programming
Member Avatar

Hey community,

how can i show the connected USB-Device like keyboard, mouse, webcam and so on?
Or how can i search in the connected USB-Devices, if I know the name …

Software Development
Member Avatar

hi

I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same.
to avoid creating size, columns, column names each …

Topic by PM312

You must add a condition because the columns are being added twice: in design-time and in run time. (DesignMode property from Windows Forms components not 100% reliable, so use this …

Software Development
Member Avatar

hi

I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same.
to avoid creating size, columns, column names each …

Software Development
Member Avatar

Hi,
I have checked all the prior forum questions on this topic, but none of the options seem to be working for me.

I am creating an output file that …

Topic by EddiRae

The EXE, running by itself as you say, is working with no problem for me.

    Private Sub cmdCreate_File_Click(sender As Object, e As EventArgs) Handles cmdCreate_File.Click
        Dim InFolder As String = …
Software Development
Member Avatar

Hi,
I have checked all the prior forum questions on this topic, but none of the options seem to be working for me.

I am creating an output file that …

Programming
Member Avatar

Hello,

i got a table in Excel (or exported to CSV).
There are 3 columns (1. column = specification / 2. columns = value1 / 3. column = value2).
On …

Topic by joshi1984

Just split the fields inside each row:

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Try
            For Each row As String In File.ReadAllLines("Table.csv")
                ' split the fields from …
Programming
Member Avatar

Hello,

i got a table in Excel (or exported to CSV).
There are 3 columns (1. column = specification / 2. columns = value1 / 3. column = value2).
On …

Programming
Member Avatar

Hello,

I want to have a manual IP-input-box like windows.

tcpip_properties.gif

I tried by MaskedTextBox but the problem is, the 3 pionts are sliding when i insert some numbers and …

Topic by joshi1984

I've made several improvents to the code, so here is another version.

Programming
Member Avatar

Hello,

I want to have a manual IP-input-box like windows.

tcpip_properties.gif

I tried by MaskedTextBox but the problem is, the 3 pionts are sliding when i insert some numbers and …

Topic by joshi1984

You may want to add a user control, with 4 or 6 textboxes depending on IPv4 or IPv6. For example:

Public Class IP_Textbox
    Const nBytes As Int32 = 4 ' …
Programming
Member Avatar

Hello,

I want to have a manual IP-input-box like windows.

tcpip_properties.gif

I tried by MaskedTextBox but the problem is, the 3 pionts are sliding when i insert some numbers and …

Software Development
Member Avatar

Getting error when showing data in list view, please help me.....
Error :* Cannot add or insert the item '10-07-2018' in more than one place. You
must first remove it …

Software Development
Member Avatar

Getting error when showing data in list view, please help me.....
Error :* Cannot add or insert the item '10-07-2018' in more than one place. You
must first remove it …

Topic by JModak

Coding like the following you get the attached image:

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ListView1.View = View.Details
        For i As Int32 = …
Software Development
Member Avatar

I have a worksheet of about 388 items that each item is exported into a template worksheet that is created to itemize each item. It creates the worksheets but I …

Topic by Divinedar

Forget all what I said. You just have to add two lines to Module1 in Function copy_template(Newsht As String):

Sheets(Newsht).Cells(44, 20) = 0
Sheets(Newsht).Cells(45, 20) = 0

So the function …