C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,428 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello all, Is this correct to get the text inside a TextBox from within thread? Private Delegate Function GetDSPNCallback() As String Private Function GetDSPN() As String If DTextBoxX.InvokeRequired Then Invoke(Sub() GetDSPN = DTextBoxX.Text.Trim) Else GetDSPN = DTextBoxX.Text.Trim End If End Function Thank you
Check this:
Private Function GetDSPN() As String
Dim t As String = Nothing
Invoke(Sub() t = DTextBoxX.Text.Trim)
Return t
End Function