Oculta barra do Windows, o menu iniciar,
desabilita o ALT + Tab
e o Ctrl + Alt + Del
Os códigos a seguir ocultam barra do Windows, o menu iniciar, desabilita o ALT + Tab e o Ctrl + Alt + Del que, se não forem reativados, continuarão desativados mesmo depois de encerrado o programa.
1 - Button1 oculta a barra de tarefas do Windows e Button2 a repõe:
void __fastcall TForm1::Button1Click(TObject *Sender) { ShowWindow(FindWindow("Shell_TrayWnd", NULL), SW_HIDE); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { ShowWindow(FindWindow("Shell_TrayWnd", NULL), SW_SHOW); }
1 - Button3 desabilita o Menu Iniciar da barra de tarefas do Windows, a combinação Alt + Tab e a combinação Ctrl + Alt + Del; e Button4 a retorna à normalidade:
void __fastcall TForm1::Button3Click(TObject *Sender) { SystemParametersInfo(SPI_SCREENSAVERRUNNING, true, 0, NULL); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { SystemParametersInfo(SPI_SCREENSAVERRUNNING, false, 0, NULL); }
1 - Podemos combinar tais ações:
void __fastcall TForm1::Button5Click(TObject *Sender) { ShowWindow(FindWindow("Shell_TrayWnd", NULL), SW_HIDE); SystemParametersInfo(SPI_SCREENSAVERRUNNING, true, 0, NULL); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button6Click(TObject *Sender) { ShowWindow(FindWindow("Shell_TrayWnd", NULL), SW_SHOW); SystemParametersInfo(SPI_SCREENSAVERRUNNING, false, 0, NULL); }
|
HOME || MAPA DO SITE || CURSOS || TUTORIAIS || LINKS || FORUM || CONTATO |