|
Postada em 12/07/2004 15:58 hs
Ola Pessoal, quando quero fazer o cursor mudar de campo com a tecla enter estou fazendo o seguinte: no evento KeyPress digito o seguinte codigo: IF Keyascii = 13 then Text1.setfocus end if como faço para fazer o focu voltar para o text1 usando a tecla de seta para cima do teclado? grato Ryey
|
|
|
|
|
Postada em 12/07/2004 16:39 hs
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If (KeyCode = 13) Then SendKeys "{TAB}" End If If (KeyCode = 38) Then SendKeys "{SHIFT}+{TAB}" End If End Sub
|
|
|
|
Postada em 12/07/2004 17:10 hs
Amigo, nao sei se estou fazendo algumacoisa errada, mas o codigo acima que vc me passou nao esta funcionando. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If (KeyCode = 13) Then SendKeys "{TAB}" End If If (KeyCode = 38) Then SendKeys "{SHIFT}+{TAB}" End If End Sub Grato
|
|
|
WaldirJr
|
POÇOS DE CALDAS MG - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 12/07/2004 17:18 hs
Vc deve colocar o Evento KeyPreview do Form como True.
Mas não me lembro se o Comando SendKeys chama o Shift. se vc tiver o Help do VB aí procure o Comando que chama o Shift (tenho quase certeza que não é {SHIFT}) que deve funcionar.
________________________ Té + Que NIMB role bons Dados! 
|
|
|