The Road to Delphi

Delphi – Free Pascal – Oxygene

VCL Styles Utils – New Feature : Non Client Area Controls


I’m very pleased to introduce a very cool new feature to the VCL Styles Utils project. This is the support for controls in the Non Client Area of the forms through the TNCControls component.

Check the next form with the Auric Vcl Style applied.


Now the same form but with a set of NC Buttons in the title bar.


To use in your forms you only need to add the Vcl.Styles.NC and Vcl.Styles.FormStyleHooks units to your project and create a TNCControls component in each form where do you want use the NC Controls.

Check the next sample code

procedure TForm1.FormCreate(Sender: TObject);
 //Add a NC Button
 //Set the style of the button
 NCControls.List[0].Style := nsSplitButton;
 //Set the style of the image
 NCControls.List[0].ImageStyle := isGrayHot;
 //Set the image list
 NCControls.List[0].Images := ImageList1;
 NCControls.List[0].ImageIndex := 3;
 //Set the bounds
 NCControls.List[0].BoundsRect := Rect(30,5,100,25);
 NCControls.List[0].Caption := 'Menu';
 //Assign the menu and events.
 NCControls.List[0].DropDownMenu:= PopupMenu1;
 NCControls.List[0].OnClick := ButtonNCClick;

And this is the result




Exist 4 kind of buttons which you can choose.

Also you can use a custom Vcl Style to draw the controls.

Try the sample application from the project repository.
Also you can download a compiled demo from here.

Remember report any bug o made your suggestions via the issue page of the project.

Author: Rodrigo

Just another Delphi guy.

4 thoughts on “VCL Styles Utils – New Feature : Non Client Area Controls

  1. That’s really awesome! I had been looking into properly adding buttons etc to the titlebar for ages but all attempts were a messy outcome, this is great!

  2. whow, really nice stuff

  3. Can you make it work with the default Windows style?

    • This component is specific for the VCL Styles. For the Windows native look and feel is necessary write a new component, maybe I will do that in the future ;)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s