Here is my problem:
Create a new windows application and add a new module:
Now on the form add two textBoxes and add in form1 code:
Modify the project property to start with the module
And now do some test:
- First click on TextBox1 and then click in TextBox 2
Validation will be called and you will see "Exception Caught"
- Second test : First click in TextBox1 and then TAB to TextBox2
validation will be done and you will see "JIT debugging......" in debug and in release mode
Why ? What's happening ?
Create a new windows application and add a new module:
Visual Basic:
Module Module1
Public Sub main()
Try
Dim myForm As New Form1()
myForm.ShowDialog()
Catch
MessageBox.Show("Exception caught")
End Try
End Sub
End Module
Now on the form add two textBoxes and add in form1 code:
Visual Basic:
Private Sub TxtValidating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating
Throw New Exception()
End Sub
Modify the project property to start with the module
And now do some test:
- First click on TextBox1 and then click in TextBox 2
Validation will be called and you will see "Exception Caught"
- Second test : First click in TextBox1 and then TAB to TextBox2
validation will be done and you will see "JIT debugging......" in debug and in release mode
Why ? What's happening ?