Search results for 'SW_SHOW'. 3 post(s) found.
- 2009/09/09 How to launch application ?
- 2007/08/25 How Do I Remove The Application Icon From The Taskbar?
- 2007/08/25 How To Open Url In Default Webbrowser
You can launch application on windows by ShellExecute function. Following is the simple example to launch application.
In case of running DOS command application such as batch file and you want not to display user, put SW_HIDE in the function option as follow
ShellExecute(Handle, 'open', PChar('c:\test\kurapa_backup.bat'), nil, nil, SW_HIDE);
Another posts included in "Delphi"
| Is there directory selection VCL component in Delphi ? (0) | 2009/09/09 |
| How to print external document ? (0) | 2009/09/09 |
| Delphi API to get windows temporary directory (0) | 2009/09/03 |
| Delphi API to get the current working directory (0) | 2009/09/03 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
| Get the length of arrays and a string (0) | 2009/08/22 |
Trackback : Cannot send a trackbact to this post.
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
Use this function to open your browser with a given URL.
uses
shellapi;
....
procedure TForm1.Label1Click(Sender:TObject);
begin
ShellExecute(handle,'open','http://www.swissdelphicenter.ch',
nil,nil,SW_SHOW);
end;
shellapi;
....
procedure TForm1.Label1Click(Sender:TObject);
begin
ShellExecute(handle,'open','http://www.swissdelphicenter.ch',
nil,nil,SW_SHOW);
end;
Another posts included in "Delphi"
| How To Send An E-mail By Code (0) | 2007/08/25 |
| How can I hide the caption bar on a form? (0) | 2007/08/25 |
| How To Make A Gradient Filled Form (0) | 2007/08/25 |
| How To Check If A Soundcard Is Installed (0) | 2007/08/25 |
| How To Change Screen Resolution (0) | 2007/08/25 |
| How To Force The Correct Decimal Separator (0) | 2007/08/25 |
| How To Register Own File Types (0) | 2007/08/25 |
| How To Get Volume Name (0) | 2007/08/25 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/28 23:04
moneyideas
-
Subject different money making ideas
2010/01/29 07:17
moneyideas
-
Subject different money making ideas
2010/01/31 16:38
moneyideas

Prev

Rss Feed