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, ...
Visits by Source
Users who voted for this posting
Jørn E. Angeltveit