I use delphi XE2. During my Main form OnCreate procedure I run some important elements, like login procedure and so on. My problem is, that when I show login form (invoked by OnCreate procedure), my application is not visible on TaskBar - it became visible when main form became visible. The problem is, that when user covered my login form by another application, without icon on taskBar he might not know that my application already runs and try to start it again. He must use ctrl+tab to get my application login form.
Now question... How to force application / OS to show application icon on Taskbar when OnCreate procedure is not finished?
regards Mario
You can override the login form's CreateParams
to include WS_EX_APPWINDOW
ex-style.
type
TLoginForm = class(TForm)
..
protected
procedure CreateParams(var Params: TCreateParams); override;
...
end;
procedure TLoginForm.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With