Vote UpVote

A new way to select and apply a VCL Style in Runtime

The Road to Delphi – Typically we use a combobox or listbox to allow to the final user select and appy a VCL Style, Today I will show you a new way using the system menu of the form. First you need to use the GetSystemMenu WinApi function  to get a  handle to the system menu of the form. Then using the AppendMenu or the InsertMenuItem methods you can customize the system menu, from here you must store the identifier of the new menu item added and finally process the WM_SYSCOMMAND message to launch an action. Check the next commented code uses System.Rtti, System.Classes, System.Generics.Collections, ...
Favorite? Off-Topic? Rodrigo @ 2014-02-12 20:42


Visits: 12
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)