[yoy - Why-O-Why]yoy - “Why-O-Why”

» frame | home browse filter search | refresh | log on

  printed dinsdag 21 oktober 2014 2:29:13 from www.yoy.be

Add another
Add child
Add token
Add reference

Taskbar-button per form in an application

If you want each form in an application to have a taskbar-button of its own, you need to add this code somewhere between the private and public section of the class declaration of your TForm descendant type:

CreateParams(var Params: TCreateParams); override;

At the bottom add this (where Form1 is the name of your form):

procedure TForm1.CreateParams(var Params: TCreateParams);
The virtual CreateParams procedure defined by the base TForm class, is used to modify the parameters used to call the Windows functions to do the work, before creating the window on screen. By setting the parent window to the desktop, a taskbar-button appears, with the icon and caption of the form. It also has the full default SystemMenu with all the options (according to the BorderIcons property of the form). The SystemMenu on the taskbar-button that is created by/for the Application object, is typically missing the Move and Size options.

location: Application Development > Programming Languages > Object Pascal > Delphi > GUI
created: 8/06/2005 20:41:19 « modified: 8/06/2005 22:11:28 (diff) weight: 0

children, tokens, references comments (1) references to object (1)

delphi up down edit   del   created: 6/10/2005 14:26:55 « modified: 6/10/2005 14:26:55 weight: 0