Windows - botao iniciar

Top  Previous  Next

How to Hide, Enable, or Disable the Start Button in Windows 

 

procedure TForm1.Button1Click(Sender: TObject);

var

  Rgn : hRgn;

begin

 {Hide the start button}

  Rgn := CreateRectRgn(0000);

  SetWindowRgn(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil),Rgn, true);

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

 {Turn the start button back on}

  SetWindowRgn(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil),0,true);

end;

 

procedure TForm1.Button3Click(Sender: TObject);

begin

 {Disable the start button}

  EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0'Button', nil),false);

end;

 

procedure TForm1.Button4Click(Sender: TObject);

begin

 {Enable the start button}

  EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil),true);

end;