Code only working with break points
-
I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:
As an example of the problem, here is the code for the minimize button's
MouseLeftButtonDown
andMouseLeftButtonUp
handlers:Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
End SubPrivate Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_inact") -
I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:
As an example of the problem, here is the code for the minimize button's
MouseLeftButtonDown
andMouseLeftButtonUp
handlers:Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
End SubPrivate Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_inact")All GUI stuff needs to be done on the main thread. Other threads are for work only.
-
I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:
As an example of the problem, here is the code for the minimize button's
MouseLeftButtonDown
andMouseLeftButtonUp
handlers:Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
End SubPrivate Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
btnMinimize.Fill = CType(Me.Resources("Min_inact")I believe that when you set a breakpoint on this point it still doesn't work. The only change that you're feeling to be the Minimize effect, is actually the IDE taking over as Active Window (minimizing other Windows) when your code hits the point of the breakpoint.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~