joshi1984 47 Light Poster

The error message is at line 40. "Option Strict On can not bind later" (or something like that, because I have to translate it by myself)

rproffitt commented: To give everyone the best chance at solving, supply the message as-is in whatever language it is. +17
joshi1984 47 Light Poster

Hi,

I had a longer break, but now I want to continue working on my little project to make my work easier.

I have an Excel file which I converted to CSV because there is no Excel on the target system.

I would like to search for a number or word via vb.net. This word can appear in all columns! If the word was found, then
the cell in column A, B, D, AA and AB is to be output in the respective labels from this line. (lbl_Cell_A, lbl_Cell_B, lbl_Cell_D, lbl_Cell_AA, lbl_Cell_AB)

Unfortunately I only know how to search in the first column (A) and only output columns one after the other.
Here is my code:

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Try
            For Each row As String In File.ReadAllLines("Test.csv")
                ' split the fields from the row '
                Dim vFields() As String = Split(row, ";")
                If vFields(0).Contains(TextBox1.Text) Then
                    lbl_Cell_B.Text = vFields(1)
                    lbl_Cell_C.Text = vFields(2)
                End If
            Next
        Catch ex As Exception
            MessageBox.Show("Error : " & ex.Message)
        End Try
    End Sub

Can you help me, please?

joshi1984 47 Light Poster

hi,

I got a string and it look like : "test : this is a test. for me."
How can I remove the first charakters? At this example I want to remove the characters "test : ". How can I do this?

I know how to delete from the end, but I realy need it from the beginning :

​Dim s As String = Label1.Text
TextBox1.Text = s.Substring(s.Length-9)
joshi1984 47 Light Poster

It isn´t necessary to know it is vbox or something else. So you don´t have to use a sdk for vbox.

because you can have at a pc 2 and much more LAN-Ports, so it is the same like in a vbox...

rproffitt commented: Good luck. Removing possible solution paths isn't how to solve problems. +15
joshi1984 47 Light Poster

Thanks, but i am looking for something waht I can use in VBox and normal Windows 7/10.
Maybe WMI but I don´t know how to select the adapter (LAN-BRIDGED or LAN-NAT), where I want to change the IP...

rproffitt commented: That's not normal. W7/10 has no knowledge about Vbox so you are back to the SDK for Vbox. +15
joshi1984 47 Light Poster

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 or only a part of the name?
I am looking for some examples since 2 days, but no one doesn´t work. So I hope you can help me with some code examples in vb.net.

best regards
joshi

joshi1984 47 Light Poster

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 i can insert letters and numbers higher then 255 (higher is not allowed in IP´s).

I hope anyone helps me, maybe with some codesnips!?! :)

best regards
josh

joshi1984 47 Light Poster

I get an error : "BaseStream is not a Member of System.IO.FileStream"

    Private Sub LoadXML()
        Try
            ' Get Xml's file stream.
            Dim vPath() As String = Split(Application.ExecutablePath, "\")
            vPath(vPath.Length - 1) = "XMLFile1.xml"
            Dim filepath As String = Join(vPath, "\")
            Dim _rstream As New FileStream(filepath, FileMode.Open)
            ' Load Xml document.
            '
            Dim dom As New XmlDocument()
            dom.Load(_rStream.BaseStream)
joshi1984 47 Light Poster

I compiled it in vs.
then I copy my exe-File in another folder. After this i started the application, it used the XML-File from inside the application and it created the xml-File in the folder. Then i closed the application.
After this i changed the xml-File by another tool.
When I started again my application it takes again the xml-file from inside the exe-file.

It is necessary, that it starts alway the xml-file from my folder. now matter if my application is newer then the XML-File from my folder.

joshi1984 47 Light Poster

Thank you, it works.

But now i got my next question : If I do it like this, i can only change the code in the XML-File in my application himself via Visual-Studio.
If i changed the code only in the XML-File in my Application-Folder on my hdd, it ignored them and overwrite it by the old file.
Do you know what i mean?

How can I do change it, that my application load at start the XML-File from my hdd?

joshi1984 47 Light Poster

I tried both codes.

But, i get always at startup the messagebox with the error "the value should not be 0" (it is my translation in english, because i got a german version) and after this my treeview is empty.

Is it because i changed

Dim _stream As Stream = _assembly.GetManifestResourceStream("MyNameSpace.XMLFile1.xml")

to

Dim _stream As Stream = _assembly.GetManifestResourceStream("MyNameSpace.nodes-kopie.xml")

?