Strange behaviour

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
 
T

tamberg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top