Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[color green]'The public method on your form
'that you can call from any thread[/color]
Public Sub DisplayMessage(ByVal Message As string)
[color green]'check if the call is coming in
'on a thread other then the one this oject
'was created in[/color]
If Me.InvokeRequired Then
[color green]'Call is from a different thread
'create a delegate to call the method
'Use an object array to store the parameters[/color]
Dim obj(0) As Object
obj(0) = Message
[color green]'Use Begin Invoke to call this
'method on this instance's thread[/color]
Me.BeginInvoke(New m_delDisplayMessage(AddressOf DisplayMessage), obj)
Else
[color green]'Call is from the same thread,
'just set the text[/color]
Me.StatusBar.Panels(0).Text = Message
End If
End Sub
[color green]'The Delegate definition for our method[/color]
Private Delegate Sub m_delDisplayMessage(ByVal Message as String)