Autor Beitrag
rd3
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 14.04.08 13:50 
Hallo,

gibt es eine Möglichkeit, ein Fenster so per "Show" aufzurufen, dass das dessen Programm nicht in der TaskBar angezeigt wird?

Für Tipps bin ich dankbar.

Viele Grüße,

rd3
Ratchet
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63

Windows7 x86
D5 Ent., D2006 Arch.
BeitragVerfasst: Mo 14.04.08 14:53 
Gibt's bei den Schweizern (www.swissdelphicenter.ch)

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
procedure TMainForm.FormShow(Sender: TObject);
var
  hwndOwner: HWnd;
begin
  hwndOwner := GetWindow(Handle, GW_OWNER);
  ShowWindow(hwndOwner, SW_HIDE);
  // For Windows 2000, additionally call the ShowWindowAsync function:
  ShowWindowAsync(hwndOwner, SW_HIDE);
  //ShowWindowAsync(Self.Handle, SW_HIDE);
end;

{
  Prevent the form from reappearing on the Taskbar after minimizing it:

  Verhindern, dass nach einem Minimize die Applikation wieder in der Taskbar
  erscheint:
}


private
  procedure WMSysCommand(var msg: TWMSysCommand); message WM_SysCommand;

{....}

implementation

procedure TMainForm.WMSysCommand(var msg: TWMSysCommand);
begin
  if msg.CmdType and $FFF0 = SC_MINIMIZE then
    hide
  else
    inherited;
end;
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 14.04.08 16:01 
damit kannst du die ganze Taskleiste wegschießen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if Checkbox1.Checked then
ShowWindow( FindWindow( 'Shell_TrayWnd',nil), SW_HIDE)
else
ShowWindow( FindWindow( 'Shell_TrayWnd',nil), SW_SHOW)
end;


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt