Se me ha ocurrido una chorrada que no se si te puede ser de utilidad
consiste en guardarse en una variable global a nivel de form el control que tien
el foco cuando el form se activa,
en el enter del textbox2 si este control que tenia el foco era el textbox 1 provoca el evento leave manualmente seria algo así
Private m_bLastControl As Contro
Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activate
m_bLastControl = ActiveContro
End Su
Private Sub TextBox2_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.Ente
If m_bLastControl Is TextBox1 The
TextBox2_Leave(m_bLastControl, Nothing
End I
End Su
' Tu codigo --
Private Sub TextBox2_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave, TextBox3.Leave, TextBox2.Leav
Select Case CType(sender, TextBox).Nam
Case "TextBox1
MsgBox("Salgo del 1 FROM 2"
Case "TextBox2
MsgBox("Salgo del 2 FROM 2"
Case "TextBox3
MsgBox("Salgo del 3 FROM 2"
End Selec
End Su
Espero que te sirv
trivet
Ver este tema:
http://www.softwaremix.net/viewtopic-482512.htm
Enviado desde
http://www.softwaremix.net
Leer las respuestas