Bug in Framework 1.1 with Enter/Leave Events

  • Thread starter Thread starter Jim Canale
  • Start date Start date
J

Jim Canale

I have an MDI app with two child forms open (FormA,
FormB). Each child form has two textboxes on it (text1,
text2). With the 1.0 framework, when you switch from one
child form to another, when you "leave" the textbox that
had the focus to go to the next textbox, it raises
a 'leave' event. Simply change the project to use the
1.1 framework and this doesn't happen. Any ideas on why
this is happening? Any fixes or a way to get back the
1.0 functionality? It appears to also ignore the
gotfocus/lost focus events too. Thanks.

Code:

MDI Parent Load

Dim a As New Form2
a.MdiParent = Me
a.Show()
Dim b As New Form2
b.MdiParent = Me
b.Show()

MDI ChildForm (Form2)

Private Sub Textbox1_LEAVE(...
textbox1.text = "" 'Put breakpoint here to verify prob
End Sub
 
I'm able to reproduce this behaviour in V1.0 functionality too.

The problem is that if they did it any other way, it would raise on message
boxes etc. (I asked during the VS.net 2003 beta.) so we get what we get. you
can do all of the work yourself in an overriden wndprc if you want.... it's
ugly and painful and you have to handle message boxes etc. but it does work.
 
The example I provided works differently between the
versions. On 1.0, it will raise the enter/leave events
on a textbox, if you switch to a different child form and
then come back. It does not do this on 1.1. There is a
difference, for sure, and now my application doesn't work
(it's broke) where it did work before. Unfortunately, I
really wanted to upgrade to 2003 but it looks like I will
have to put that on hold.
 
Back
Top