Strange behaviour

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

Hello,

I suddenly encountered a strange problem while programming some
additional functionality to a VB .NET app. Another form of my
application gets loaded unintentionally. Debugging learned that this
happens when... I do a simple MessageBox.Show.

Code:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSave.Click
MessageBox.Show("Ok")
' other code

End Sub


When I place a breakpoint at the line MessageBox.Show and hit F10, the
other form will be loaded... I don't have a clue what's going on here.


Kind regards,

Frank
 
Often such problems can be solved by analyzing a program statically
rather than debugging at runtime. Maybe there is less magic going on
than it seems at first sight. In some cases the debugger might even be
the cause of unexpected behaviour e.g. by calling initializers in
another sequence.
 
Back
Top