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:
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:
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