|
-
Feb 16th, 2007, 02:41 PM
#1
Thread Starter
New Member
[2005] updating ToolStripStatusLabel1 from a 2nd form
Hi Guys
I have 2 forms.
Main_form has a StatusStrip1 with ToolStripStatusLabel1 I would like to update this label with lat and Long information
GPS form contains the serial port and all the GPS information
when ever I get a new GPS message I call public sub Update_status_bar
located in main_form
I don't get any errors but no data in the ToolStripStatusLabel1
Public Sub update_status_bar()
Dim temp As String
temp = Lat_Dec & " " & Long_Dec
SetTextBoxText(temp)
End Sub
Public Delegate Sub SetTextBoxTextDelegate(ByVal text As String)
public Sub SetTextBoxText(ByVal text As String)
If Me.StatusStrip1.InvokeRequired Then
'This is a worker thread so create a delegate to cross the thread boundary.
Me.StatusStrip1.Invoke(New SetTextBoxTextDelegate(AddressOf SetTextBoxText), ToolStripStatusLabel1.Text = text)
Else
'This is the UI thread so access the control's members directly.
Me.ToolStripStatusLabel1.Text = text
End If
Me.StatusStrip1.Refresh()
End Sub
any Ideas?
Last edited by Glenozzy; Feb 17th, 2007 at 11:16 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|