테스크 바 버튼 숨기기
APP/UI 2013. 4. 16. 16:47 |
테스크 바 버튼 숨기기
// 델파이 2006 이하
// ******************************************************* //
procedure TForm1.FormCreate(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE) ;
SetWindowLong(Application.Handle, GWL_EXSTYLE, getWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW) ;
ShowWindow(Application.Handle, SW_SHOW) ;
end;
// ******************************************************* //
// 델파이 2007 이상
// ******************************************************* //
// Menu->Project->View Source
program Project1;
uses
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := False; // False로 설정
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
// Unit1.pas
procedure TForm1.FormActivate(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;