skip to content »

autolubitel-nk.ru

Toolstripstatuslabel not updating

toolstripstatuslabel not updating-72

I'm trying to take a console application and build a gui for it.

Run starts pumping the message loop on your UI thread. So the statement that changes the Status Label on your form is not executing until after the form is closed. That is why you dont see your status label changing. Text before showing the Form, but after the Form is shown then changing the status is not possible. Then data is receiving from the server, the timestamp should be put in the statusbar "Last received at 2006-02-27 ". The Status Strip and Tool Strip Status Label controls replace and add functionality to the Status Bar and Status Bar Panel controls; however, the Status Bar and Status Bar Panel controls are retained for both backward compatibility and future use, if you choose.Often, a program will call for you to update the contents of status bar panels dynamically at run time, based on changes to application state or other user interaction. Show("Internet Explorer navigation was unsuccessfull:" & vb Cr Lf & _ Space(4) & Chr(149) & "Elapsed time = " & Format(timer Browser. Number & ")", str Method Name, Message Box Buttons. Error) End Try End Sub The 3rd line after the Try statement in the Browse method calls the frm Main form's Status Message method.

Navigate(URL:=str URL, Flags:=CType(navflags, Object)) Do While Not flg Complete '..for IE to load page (see obj IE. Elapsed Milliseconds, "#,##0") & " milliseconds" & vb Cr Lf & _ Space(4) & Chr(149) & "URL = " & str URL, str Method Name, Message Box Buttons. Exclamation) End If Else If Not flg Silent Then Message Box.

Document Complete 'Fires when a navigation operation finishes, is halted, or fails. Write Line("Document Complete() event fired @ : , ", Date. I think you should find out whether that event is raised on a secondary thread. Have the main form pass a reference to itself into the module and then use that to check its Invoke Required property in the event handler. " Videos: VB | C# VBForums Database Development FAQ My Code Bank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control Beginner Tutorials: VB | C# | SQL 2007-2016 Why is my data not saved to my database? " Videos: VB | C# VBForums Database Development FAQ My Code Bank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control Beginner Tutorials: VB | C# | SQL I figured out the issue.

The mod Logins module also has the Document Complete event method (to go with its With Events declaration): Sub my IE_Document Complete(p Disp As Object, By Ref URL As Object) Handles my IE. With this additional information, what do you think?

The Tool Strip Status Label_MSG control does not have a Refresh() method, so use the parent control's Refresh() method Dim str Method Name = New System. Here is the code for the Browse method: Sub Browse(By Val str URL As String, Optional int Timeout As Integer = -1, Optional flg Silent As Boolean = True) 'int Timeout is the number of milliseconds to wait while the Browser navigates to the specified URL 'Requires a . ' This event p Disp parameter is the same as the IDispatch interface pointer of the frame in which this event fires. Name '..procedure's name Dim _DEBUG As Boolean = True Try System.

Number & ")", str Method Name, Message Box Buttons. Error) End Try End Sub Are you by any chance calling that method on a secondary thread? My first guess would be that you are calling it on a secondary thread using the default instance, which means you're actually making the change to a different form to the one that you can see on-screen. The frm Main form has a button, and a Status Strip with a Tool Strip Status Label. 'url == String expression that evaluates to the URL to which the browser is navigating. So my application was updating the Tool Strip Status Label label control on the new instance of frm Main instead of the default instance of frm Main.

The Browse method opens the Internet Explorer and calls its Navigate method. Do Events() '...allow the OS to complete any tasks End If Catch ex As Exception Message Box. Everything works in the application, except the updating of the frm Main form's Tool Strip Status Label label control.