How to add system menu items to a form ?



How to add system menu items to a form ?..

Answer / Priyanshi Srivastava

To add system menu items to a form in Delphi, you can create a TPopupMenu and add the desired items using the Menu.Items.Add function. Then, assign this popup menu to the Form's PopupMenu property.nnExample:nnvarn MyForm: TForm1;n MyMenu: TPopupMenu;nnprocedure TForm1.FormCreate(Sender: TObject);nbeginn MyMenu := TPopupMenu.Create(Self);n MyMenu.Items.Add("&New");n MyMenu.Items.Add("Open");n Self.PopupMenu := MyMenu;nend;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to Use FindFirst to search for files?

1 Answers  


Compare the similarities and differences among Sockets, DCOM, OLE Enterprise?

1 Answers  


Does Kylix support Postgres?

1 Answers  


How to Change the owner of a component at runtime ?

0 Answers  


How to Provide lookup capability?

1 Answers  


How to Limit the amount of text entered in a TEdit?

1 Answers  


Where can I get a copy of Delphi?

1 Answers  


How to Get a list of the available drives on a system?

1 Answers  


How to Convertan integer into a binary string?

1 Answers  


How to make sure the function DLLPROC is called when your DLL is unloaded?

1 Answers  


How to print an HTML document from inside of your application?

1 Answers  


Is there any way to record a keyboard macro in the IDE?

1 Answers  


Categories