leandroptu Posted April 18, 2008 Report Share Posted April 18, 2008 Ola, Pessoal, Estou usando está função: ***************************** Function CtrlAltDel(lState) If !lState SysParInfo( 97, 1, 0, 0 ) Else SysParInfo( 97, 0, 0, 0 ) Endif Return NIL **************************** DLL32 FUNCTION SysParInfo( uAction AS LONG,; uParam AS LONG,; vParam AS LONG,; uWinIni AS LONG ) AS LONG PASCAL; FROM "SystemParametersInfoA" LIB "User32.dll" Para travar a sequencia Ctrl+Alt+Del e não consigo, para o travamento do teclado eu estou usando a função: // Travar e destravar o teclado | BlockInput( .T. ) // desabilita | BlockInput( .F. ) // habilita DLL32 FUNCTION BlockInput( lTrava AS BOOL ) AS BOOL LIB "User32.DLL" Fivewin 2.7 + XHarbour Build 0.99.60 + WorkShop + vLib + SqlLib + MySQL 5.0.27 + xDev Studio E-mail: Leandroptu@success.inf.br Msn: leandroptu@ada.com.br Paracatu/MG Vamos Aderir:"Retorne avisando se a dica funcionou" Quote Link to comment Share on other sites More sharing options...
leandroptu Posted April 18, 2008 Author Report Share Posted April 18, 2008 Ola, Pessoal, Estou usando está função: ***************************** Function CtrlAltDel(lState) If !lState SysParInfo( 97, 1, 0, 0 ) Else SysParInfo( 97, 0, 0, 0 ) Endif Return NIL **************************** DLL32 FUNCTION SysParInfo( uAction AS LONG,; uParam AS LONG,; vParam AS LONG,; uWinIni AS LONG ) AS LONG PASCAL; FROM "SystemParametersInfoA" LIB "User32.dll" Para travar a sequencia Ctrl+Alt+Del e não consigo, para o travamento do teclado eu estou usando a função: // Travar e destravar o teclado | BlockInput( .T. ) // desabilita | BlockInput( .F. ) // habilita DLL32 FUNCTION BlockInput( lTrava AS BOOL ) AS BOOL LIB "User32.DLL" Fivewin 2.7 + XHarbour Build 0.99.60 + WorkShop + vLib + SqlLib + MySQL 5.0.27 + xDev Studio E-mail: Leandroptu@success.inf.br Msn: leandroptu@ada.com.br Paracatu/MG Vamos Aderir:"Retorne avisando se a dica funcionou" Quote Link to comment Share on other sites More sharing options...
kapiaba Posted April 18, 2008 Report Share Posted April 18, 2008 // Antonio Carlos Pantaglione // Toninho@fwi.com.br // Ago/2001 #include "fivewin.ch" procedure main() CtrlAltDel( .f. ) MsgAlert( "CTRL-ALT-DEL DESLIGADO" + CRLF + "Please, press CTRL + ALT + DEL", "Desligado" ) CtrlAltDel( .t. ) MsgAlert( "CTRL-ALT-DEL LIGADO" + CRLF + "Please, press CTRL + ALT + DEL", "Ligado" ) return // Antonio Carlos Pantaglione // Toninho@fwi.com.br // Ago/2001 #include "fivewin.ch" #include "dll.ch" //----------------------------------------------------------------------------// Procedure CtrlAltDel( lState ) if !lState SysParInfo( 97, 1, 0, 0 ) else SysParInfo( 97, 0, 1, 1 ) endif return //----------------------------------------------------------------------------// dll32 static function SysParInfo( uAction AS LONG, uParam AS LONG, vParam AS LONG, uWinIni AS LONG ) ; AS LONG PASCAL FROM "SystemParametersInfoA" LIB "User32.dll" //----------------------------------------------------------------------------// id=code>id=code>//-> O RETORNO NO WINDOWS 95/98 E MILLLENIUM EDITION, SERA CORRETO. //-> NO XP, APESAR DA TELA DO GERENCIADOR DE TAREFAS DO WINDOWS XP 'APARECER', //-> O WINDOWS NAO SE REINICIARA FORCANDO QUE O USUARIO TECLE ESCAPE PARA //-> RETORNAR AO LOCAL QUE ESTAVA. //-> PARA EVITAR QUE O GERENCIADOR DE TAREFAS DO WINDOWS XP SE ACIONE, DEVES FAZER OUTRA CHAMADA A API DO WINDOWS. VEJA COM VAGNER WIRTS OU GIOVANNY VECCHI COMO FAZER ISTO. ESTOU MEIO ´LOIRA´ HOJE. KKKKK Abracos. João Santos - São Paulo. kmt_karinha@pop.com.br kapiaba@brfree.com.br Fone: (11) 3106-2832 FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe Quote Link to comment Share on other sites More sharing options...
leandroptu Posted April 18, 2008 Author Report Share Posted April 18, 2008 Alguem usar as funções abaixo para desativar e habilitar o teclado? GetKeyState? SetKeyState? Fivewin 2.7 + XHarbour Build 0.99.60 + WorkShop + vLib + SqlLib + MySQL 5.0.27 + xDev Studio E-mail: Leandroptu@success.inf.br Msn: leandroptu@ada.com.br Paracatu/MG Vamos Aderir:"Retorne avisando se a dica funcionou" Quote Link to comment Share on other sites More sharing options...
kapiaba Posted April 18, 2008 Report Share Posted April 18, 2008 citação:Alguem usar as funções abaixo para desativar e habilitar o teclado? GetKeyState? SetKeyState? Fivewin 2.7 + XHarbour Build 0.99.60 + WorkShop + vLib + SqlLib + MySQL 5.0.27 + xDev Studio E-mail: Leandroptu@success.inf.br Msn: leandroptu@ada.com.br Paracatu/MG Vamos Aderir:"Retorne avisando se a dica funcionou" id=quote>id=quote>SetKeyState? -> DESCONHEÇO A FUNCIONALIDADE. GetKeyState? -> USA-SE COMUMENTE, PARA CHECAR O ESTADO DE UMA TECLA DISPARADA DE UM GET OU DE UM EVENTO. EXEMPLO: Do Case Case nKey == VK_ESCAPE .OR. GetKeyState( VK_ESCAPE ) lGravacao := .F. EndCase id=code>id=code>João Santos - São Paulo. kmt_karinha@pop.com.br kapiaba@brfree.com.br Fone: (11) 3106-2832 FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe 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.