I have a VB .NET application that has a text box with the
following code to handle the leave event.
Private Sub txtIDiscountRate_TextChanged(ByVal sender
As System.Object, ByVal e As System.EventArgs) Handles
txtIDiscountRate.Leave
If txtIDiscountRate.Text.Trim <> "" AndAlso _
MsgBox("Are you sure you want to use a non-
default discount rate?", MsgBoxStyle.OKCancel) _
= MsgBoxResult.Cancel Then
'txtIDiscountRate.Text = ""
End If
End Sub
There are also several buttons on the same dialog box as
the text box. The problem occurs when I have focus on
the text box and then click on a button. If the call to
MSGBOX gets executed (because there is text in the
textbox) then the button click event never gets called.
(I have a breakpoint set on the first line of the button
click event routine.) I've checked (by commenting out
code) that it is definitely the call to MSGBOX which
makes the call to the button click routine get lost.
Suggestions please. Thanks