Search results for 'ShowWindow'. 2 post(s) found.
If you need to hide your application from the Windows TaskBar, you can use the following trick:
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;
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;
Another posts included in "Delphi"
| How to track a user's idle time (0) | 2007/09/25 |
| How to know whether the font is TrueTypeFont or not (0) | 2007/09/25 |
| List Devices (LPT, COM ports, ...) (0) | 2007/09/25 |
| How to play sounds on the PC Speaker ? (0) | 2007/09/20 |
| How to install an INF file using Delphi ? (0) | 2007/09/20 |
| How to determine the output of a console application ? (0) | 2007/09/20 |
| Get text from the control at pos x,y on screen (0) | 2007/09/20 |
| Get dimensions of usable space on monitor (work area) (0) | 2007/09/20 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/28 23:46
moneyideas
-
Subject different money making ideas
2010/01/29 08:18
moneyideas
-
Subject different money making ideas
2010/01/31 16:41
moneyideas
To remove the icon from the Taskbar, you need to call a Windows API call:
BOOL ShowWindow(HWND hwnd,int nCmdShow);
Delphi makes it very easy to use this command. All you need to do is supply the Application.handle and SW_HIDE to remove the icon from the Taskbar.
To display the icon on the Taskbar use SW_SHOW in your ShowWindow parameter.
Both examples are shown in the source below.
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowWindow (Application.Handle, SW_HIDE);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowWindow (Application.Handle, SW_SHOW);
end;
begin
ShowWindow (Application.Handle, SW_HIDE);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowWindow (Application.Handle, SW_SHOW);
end;
Another posts included in "Delphi"
| How to draw Transparent Text on bitmap (0) | 2007/09/01 |
| Browse for Computers, Folders, Files and Printers (0) | 2007/09/10 |
| Checking If File Is In Use (0) | 2007/09/10 |
| How To Show The Print Dialog And Print Text Files (0) | 2007/08/25 |
| How To Make An Animated Application Icon (0) | 2007/08/25 |
| How To Pass The Focus To The Next/prior Control (0) | 2007/08/25 |
| How To Make Rounded Windows (0) | 2007/08/25 |
| How To Get Windows Uptime (0) | 2007/08/25 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 02:14
moneyideas
-
Subject different money making ideas
2010/01/29 10:22
moneyideas
-
Subject different money making ideas
2010/01/31 16:43
moneyideas

Prev

Rss Feed