saber donde está el foco
hola amigos, tengo un problemilla, tengo varios textbox y me gustaria saber como se puede averiguar cual de ellos tiene el foco o cursor, gracias!
hola,
muy buena pregunta, si consigues algo me lo cuentas por favor.
yo en una epoca hice algo parecido, y fue asi:
tenia 3 textbox y a cada uno le programe el evento gotfocus, y guardaba el valor en una variable y despues mostraba la informacion en un msgbox
ejm:
Dim text As String
Private Sub Command1_Click()
MsgBox "El Foco Lo tiene " & text & "", vbInformation
End Sub
Private Sub Text1_GotFocus()
text = Text1
End Sub
Private Sub Text2_GotFocus()
text = Text2
End Sub
Private Sub Text3_GotFocus()
text = Text3
End Sub
muy buena pregunta, si consigues algo me lo cuentas por favor.
yo en una epoca hice algo parecido, y fue asi:
tenia 3 textbox y a cada uno le programe el evento gotfocus, y guardaba el valor en una variable y despues mostraba la informacion en un msgbox
ejm:
Dim text As String
Private Sub Command1_Click()
MsgBox "El Foco Lo tiene " & text & "", vbInformation
End Sub
Private Sub Text1_GotFocus()
text = Text1
End Sub
Private Sub Text2_GotFocus()
text = Text2
End Sub
Private Sub Text3_GotFocus()
text = Text3
End Sub
