Delphi: Show other Windows in addition to to the Main Window in the Taskbar
Tip by Progger99 | Last update on 2022-04-18 | Created on 2011-12-24
When writing a Delphi application with more than one windows (forms), normally only the main window of your program appears in the taskbar, so that only this main window can be opened by using the taskbar. All of the other windows can be seen on the desktop but not in the taskbar, so that a window quickly can "disappear", when it is hidden behind another window.
If you want to display other windows next to the main form in the taskbar, you can use the following code:
protected procedure CreateParams(var Params: TCreateParams); override; //... procedure TForm1.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; Params.WndParent := GetDesktopWindow; end;
The procedure CreateParams can just be copied to the unit of each form or window that should be displayed in the taskbar. It is important that you declare the procedure under "public" and not as "private". If the area "protected" is missing in your unit, you can simply create it over the private declarations.
About the Author
The author has not added a profile short description yet.
Show Profile
Related Topics
MIME Types of Microsoft Office File Formats
Info | 0 Comments
Delphi: System-Wide HotKey
Tutorial | 1 Comment
Windows: How to run a Program as Administrator - Once, Always or with Shortcut
Tutorial | 0 Comments
How to Replace multiple Texts at the same Time
Tutorial | 0 Comments
Lazarus: Open File or Document platform-independent
Tip | 0 Comments
Lazarus: Detect Operating System (Compiler Switch)
Tutorial | 0 Comments
Delphi/Lazarus: Command Line Parameter Tutorial Part 1: Sending
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.