Ariston Santos Posted May 16, 2005 Report Share Posted May 16, 2005 Olá pessoal. Como faço para desligar o computador através da minha aplicação? Exite algum comando? Grato! Ariston Santos. Ariston Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 17, 2005 Report Share Posted May 17, 2005 http://www.fivewin.com.br/exibedicas.asp?id=128 Bad Boy - The HuntsMan Of E.A.J. Automação Comercial. kapiaba@brfree.com.br FW 2.3C CLIPPER 5.3B BLINKER 7.0 WORKSHOP.EXE Quote Link to comment Share on other sites More sharing options...
marcelo Posted May 17, 2005 Report Share Posted May 17, 2005 Ola A dica que o Kapiaba sugeriu, não funcionou por completo no windows xp,só o boot.Para reiniciar o computador mude para WinExec('Shutdown -r'), para Desligar mude para WinExec('shutdown -s'). Nota: ShutDown do Windows\System32 Yrece Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 17, 2005 Report Share Posted May 17, 2005 Vejam a FUNCTION APAGA() http://www.fivewin.com.br/exibedicas.asp?id=302 Bad Boy - The HuntsMan Of E.A.J. Automação Comercial. kapiaba@brfree.com.br FW 2.3C CLIPPER 5.3B BLINKER 7.0 WORKSHOP.EXE Quote Link to comment Share on other sites More sharing options...
Ariston Santos Posted May 17, 2005 Author Report Share Posted May 17, 2005 Obrigado por tudo. A propósito, ainda estou com problemas com o CTRL+ALT+DEL (de outro tópico). Recebi algumas dicas mais ainda não consegui travar essas teclas no XP. Já testei as seguintes: 1. SysTaskChange( .F. ) // Só funciona no Windows 98 2. TravaTc() Dll32 FUNCTION TravaTc() AS VOID FROM "VoTravaTeclado" LIB "VoTravaKey.DLL" Dll32 FUNCTION LiberaTc() AS VOID FROM "VoLiberaTeclado" LIB "VoTravaKey.DLL" // Trava o teclado completo e o mouse, mas preciso de uma função que trave apenas CTRL + ALT + DEL também no XP. 3. if !lState SysParInfo( 97, 1, 0, 0 ) else SysParInfo( 97, 0, 0, 0 ) endif dll32 static function SysParInfo( uAction AS LONG, uParam AS LONG, vParam AS LONG, uWinIni AS LONG ) ; AS LONG PASCAL FROM "SystemParametersInfoA" LIB "User32.dll" Se alguem tiver alguma coisa funcional agradeço pela ajuda. Ariston Quote Link to comment Share on other sites More sharing options...
Ariston Santos Posted May 17, 2005 Author Report Share Posted May 17, 2005 Obrigado por tudo. A propósito, ainda estou com problemas com o CTRL+ALT+DEL (de outro tópico). Recebi algumas dicas mais ainda não consegui travar essas teclas no XP. Já testei as seguintes: 1. SysTaskChange( .F. ) // Só funciona no Windows 98 2. TravaTc() Dll32 FUNCTION TravaTc() AS VOID FROM "VoTravaTeclado" LIB "VoTravaKey.DLL" Dll32 FUNCTION LiberaTc() AS VOID FROM "VoLiberaTeclado" LIB "VoTravaKey.DLL" // Trava o teclado completo e o mouse, mas preciso de uma função que trave apenas CTRL + ALT + DEL também no XP. 3. if !lState SysParInfo( 97, 1, 0, 0 ) else SysParInfo( 97, 0, 0, 0 ) endif dll32 static function SysParInfo( uAction AS LONG, uParam AS LONG, vParam AS LONG, uWinIni AS LONG ) ; AS LONG PASCAL FROM "SystemParametersInfoA" LIB "User32.dll" Se alguem tiver alguma coisa funcional agradeço pela ajuda. Ariston Quote Link to comment Share on other sites More sharing options...
Kleyton Posted May 18, 2005 Report Share Posted May 18, 2005 Ariston, estou postando em dicas um arquivo OBJ, basta incluir no seu arquivo LNK, e depois executar os procedimentos abaixo: SysTaskChange( .t. ) && DESABILITAR TECLADO SysTaskChange( .f. ) && HABILITAR TECLADO Kleyton Clipper5.2E+Clipper5.3b+Blink7+FW2.0d cleitonbala@bol.com.br 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.