Hi,
I've made a class that exposes a 'Progress' event. In a windows application I use the progress event to show some information (about the progress of the class task suprisingly..):
----------------------------------------------------
Private Sub hej_Progress(ByVal msg As String) Handles hej.Progress
Label1.Text = msg
Me.Refresh()
End Sub
----------------------------------------------------
This works fine as long as the window is in focus. But if I move another window in front of it, the repainting of the form stops - even if I give focus back to the form.
I can get rid of the problem by adding
System.Windows.Forms.Application.DoEvents()
in the event handler, but why does the refresh not work?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
I've made a class that exposes a 'Progress' event. In a windows application I use the progress event to show some information (about the progress of the class task suprisingly..):
----------------------------------------------------
Private Sub hej_Progress(ByVal msg As String) Handles hej.Progress
Label1.Text = msg
Me.Refresh()
End Sub
----------------------------------------------------
This works fine as long as the window is in focus. But if I move another window in front of it, the repainting of the form stops - even if I give focus back to the form.
I can get rid of the problem by adding
System.Windows.Forms.Application.DoEvents()
in the event handler, but why does the refresh not work?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'