Autor Beitrag
Sephiroth
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 102



BeitragVerfasst: Mo 12.08.02 16:20 
Hi Leute,

Ich hab eine DLL die Forumulare beinhaltet. Wenn das Hauptformular der Formular-DLL sichtbar wird soll es aber von der Taskbar ausgeblendet werden.

Folgendes hab ich bereits probiert:

ausblenden Quelltext
1:
2:
3:
4:
5:
  ShowWindow( Application.Handle, SW_HIDE );
  SetWindowLong( Application.Handle, GWL_EXSTYLE,
                 GetWindowLong(Application.Handle, GWL_EXSTYLE) or
                 WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
  ShowWindow( Application.Handle, SW_SHOW );


Aus der EDH-Online Hilfe.

Und:

ausblenden volle Höhe 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;


Aus dem Forum hier. Leider geht es mit beidem nicht. Ich versuche ja die DLL zu verbergen (also deren Formulare) Kann es sein das s überhaupt keinen Application.Handle hat? Oder der Handle das ist, welches die DLL aufgerufen hat? Wie kann die Formular-DLL aus der Taskbar ausblenden?

Vielen Dank im voraus
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mi 04.09.02 20:26 
Titel: Taskbar-Button ausblenden
Wenn ich das richtig verstanden habw, willst du den Taskbar-Button einer Anwendung ausblenden. Dabei darfst du nicht mit dem Handle der Anwendung arbeiten, sodern mit dem Owner-Handle des Hauptformulars.

ausblenden Quelltext
1:
ShowWindow(GetWindow(Form1.Handle, GW_OWNER), SW_HIDE);					


Form1 stellt hier das Hauptformular dar.