• Olá Visitante, se gosta do forum e pretende contribuir com um donativo para auxiliar nos encargos financeiros inerentes ao alojamento desta plataforma, pode encontrar mais informações sobre os várias formas disponíveis para o fazer no seguinte tópico: leia mais... O seu contributo é importante! Obrigado.

Oculta barra do Windows, o menu iniciar

helldanger1

GForum VIP
Entrou
Ago 1, 2007
Mensagens
29,631
Gostos Recebidos
1
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);

}
 
Topo