Paulo1361303230 Posted July 7, 2011 Report Share Posted July 7, 2011 Boa tarde a todos! Existe alguma simples forma ao teclar o sistema entender que quero sair de uma dialog entre outras opções? Ex. @3.9,01 BUTTON "&1" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se1:=1,oLbx)) font botaog @3.9,06 BUTTON "&2" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se2:=2,oLbx)) font botaog @3.9,11 BUTTON "&3" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se3:=3,oLbx)) font botaog *********** @5.6,01 BUTTON "&0" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se0:=0,oLbx)) font botaog @5.6,11 BUTTON "&Ok" OF oDlg SIZE 20,20 ACTION (oDlg:End()) font bfont *********** Activate Dialog oDlg center // on init senhaver(odlg) Onde encontra-se o BUTTON &Ok gostaria que ao teclar fechasse a janela. Obrigado José Paulo H.Rodrigues Santos/SP drplus@uol.com.br adm_house@hotmail.com Quote Link to comment Share on other sites More sharing options...
Paulo1361303230 Posted July 7, 2011 Author Report Share Posted July 7, 2011 Boa tarde a todos! Existe alguma simples forma ao teclar o sistema entender que quero sair de uma dialog entre outras opções? Ex. @3.9,01 BUTTON "&1" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se1:=1,oLbx)) font botaog @3.9,06 BUTTON "&2" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se2:=2,oLbx)) font botaog @3.9,11 BUTTON "&3" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se3:=3,oLbx)) font botaog *********** @5.6,01 BUTTON "&0" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se0:=0,oLbx)) font botaog @5.6,11 BUTTON "&Ok" OF oDlg SIZE 20,20 ACTION (oDlg:End()) font bfont *********** Activate Dialog oDlg center // on init senhaver(odlg) Onde encontra-se o BUTTON &Ok gostaria que ao teclar fechasse a janela. Obrigado José Paulo H.Rodrigues Santos/SP drplus@uol.com.br adm_house@hotmail.com Quote Link to comment Share on other sites More sharing options...
joaosolution Posted July 7, 2011 Report Share Posted July 7, 2011 Paulo Eu utilizo: oDlg:bKeyDown:={|nKey| iif(nKey=VK_F2,oBtnF2:Click(),)} Para acionar o botão com a tecla F2. Acredito que se você alterar para VK_ENTER vai conseguir o que deseja. Att João Bosco Contagem/MG FWH 10.6b xHb 1.2.1 WorkShop 4.5 PellesC SQLLIB SQLRDD Quote Link to comment Share on other sites More sharing options...
aferra Posted July 7, 2011 Report Share Posted July 7, 2011 Olá Paulo @5.6,11 BUTTON "&Ok" OF oDlg SIZE 20,20 ACTION (oDlg:End()) font bfont DEFAULTid=red> Alessandroid=blue> FW9.07+xHb121+PellesC+CDX Fico feliz com os Meus erros, pois eles me apontam a direção para o acerto.id=red> Quote Link to comment Share on other sites More sharing options...
Paulo1361303230 Posted July 8, 2011 Author Report Share Posted July 8, 2011 Olá amigos João Bosco e Alessandro. Agradeço pela ajuda mais infelizmente não funcionou. A minha idéia era a seguinte; Criar uma espécie de teclado virtual com BUTTON(s) que poderia ser utilizado manualmente, e após digitar a senha com um simples finalizaria a Janela de Dialog. Tentei todas as formas conhecidas, inclusive a fornecida pelos amigos onde não obtive nenhum sucesso. Se não houver jeito, continuarei no get password. DEFINE DIALOG oDlg FROM 3,10 TO 19.5,49 TITLE "Permissões/Log - SENHA "+str(wtent,2)+'/3' // COLOR rgb(255,255,255),rgb(0,0,128) oDlg:bPainted := { | hDC | PalBmpDraw( hDC, 0, 0, oPapel:hBitMap,oPapel:hPalette,oDlg:nRight+2,oDlg:nBottom+2) } @01,08 sSay str(v_digi,2) COLOR rgb(128,000,000) font bfont wtime:=time() xtime:=subs(wtime,8,8) * @0,6 sSAY "Senha de Acesso, informe!" OF oDlg font brfont * @6.8,7.2 ssay oserie of odlg COLOR rgb(128,0,0) font brfont * @01,8 GET senha_get OF oDlg PASSWORD picture "999999" *********** @0.5,01 BUTTON "&7" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se7:=7,oDlg:End())) font botaog @0.5,06 BUTTON "&8" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se8:=8,oDlg:End())) font botaog @0.5,11 BUTTON "&9" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se9:=9,oDlg:End())) font botaog *********** @2.2,01 BUTTON "&4" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se4:=4,oDlg:End())) font botaog @2.2,06 BUTTON "&5" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se5:=5,oDlg:End())) font botaog @2.2,11 BUTTON "&6" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se6:=6,oDlg:End())) font botaog *********** @3.9,01 BUTTON "&1" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se1:=1,oDlg:End())) font botaog @3.9,06 BUTTON "&2" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se2:=2,oDlg:End())) font botaog @3.9,11 BUTTON "&3" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se3:=3,oDlg:End())) font botaog *********** @5.6,01 BUTTON "&0" OF oDlg SIZE 20,20 ACTION (ordsenha(n_se0:=0,oDlg:End())) font botaog @5.6,11 BUTTON "&Ok" OF oDlg SIZE 20,20 ACTION (oDlg:End()) font botaog DEFAULT *********** * oLbx:bKeyDown:={|nKey| IIF(nKey=VK_ENTER,odlg:end(),)} Activate Dialog oDlg center Lembrando tambem, que o comando oLbx:bKeyDown funciona se estiver utilizando um ListBox aberto. Obrigado pela atenção Saudações José Paulo H.Rodrigues Santos/SP drplus@uol.com.br adm_house@hotmail.com Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 8, 2011 Report Share Posted July 8, 2011 ACTIVATE DIALOG... ; VALID( CHECA_TECLAS( nKey ) ) STATIC FUNCTION CHECA_TECLAS( nKey ) ... FAÇA O QUE QUISER AQUI DO CASE CASE.. CASE... ENDCASE RETURN( .T. ) id=code>id=code>João Santos - São Paulo. kmt_karinha@pop.com.br joao@pleno.com.br Fone: (11) 3106-2832 / 8243-5632 - TIM FWH 2.7 - xHARBOUR WorkShop.Exe Editado por - kapiaba on 08/07/2011 11:02:29 Quote Link to comment Share on other sites More sharing options...
Eduardo Bilato Posted July 28, 2011 Report Share Posted July 28, 2011 Ja tentou usar um SET KEY nessa tela? att Eduardo de Camargo Bilato email: eduardobilato@gmail.com msn: dunhox@hotmail.com Quote Link to comment Share on other sites More sharing options...
Geo_sts Posted July 28, 2011 Report Share Posted July 28, 2011 Pelo que entendi.. vc pode usar isso: SKEY(VK_RETURN,{||g_Save:=.t.,odlg:end()}) att, Geovanni Holior Analista de Sistema Clip53 * FHW 9.1/../9.5 MySql skype:geovanni.holior " Tudu Posso naquele que me Fortalece!" Quote Link to comment Share on other sites More sharing options...
joaosolution Posted July 28, 2011 Report Share Posted July 28, 2011 Paulo Boa tarde Depois de 2 horas testanto kkkkkkkk @0.5,01 BUTTON oBtn PROMPT "&7" OF oDlg SIZE 20,20 ACTION ( iif(oDlg:nLastkey==VK_RETURN,oDlg:End(),ordsenha(n_se7:=7))) font botaog Realmente algumas coisas bobas dão mais trabalho que um sistema inteiro. Att João Bosco Contagem/MG FWH 10.6b xHb 1.2.1 WorkShop 4.5 PellesC SQLLIB SQLRDD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.