Home > Enterprise >  label text not display the correct value of user (string).. but messagebox.show show the value
label text not display the correct value of user (string).. but messagebox.show show the value

Time:11-05

im trying to show the value of user in the textbox1.text but when i type

textbox1.text = user

nothing show and the tool stop working

im trying to change the value of textbox1.text via web response message

so the user is always changing and im trying to show it in textbox1.text


        Dim thlogin1 As Thread = New Thread(Sub() Login1(user, pass, target))
        thlogin1.Start()

    End Sub

    Private Sub Login1(ByVal user As String, ByVal pass As String, ByVal target As String)

        Dim k As String
        k = user
        textbox.Text = k


    End Sub


[![this what i have tried][2]][2]


  [1]: https://i.stack.imgur.com/1o7uP.png
  [2]: https://i.stack.imgur.com/0pBFw.png

CodePudding user response:

Try changing:

textbox.Text = ("k")

To:

Me.Invoke(Sub()
          textbox.Text = k
          End Sub)
  • Related