Click to See Complete Forum and Search --> : drop down menu


dummyagain
March 5th, 2006, 09:54 AM
I cannot find any drop down menu in the Window Form Toolbar, I would like to know how to add a drop down menu in my C# application program?

Thank you

jhammer
March 5th, 2006, 12:23 PM
In 2005 it is built in.
In 2003 you will need to add the combo yourself to the ToolBar:

ComboBox cmb = new ComboBox();
myToolBar.Controls.Add(cmb);

dummyagain
March 5th, 2006, 11:54 PM
Thank you for your help.

It works!! But since i use GUI view to design my application program, once i used the coding to add the window component, the position of the drop down menu will overlap with other window component. Also, i cannot find the InitializeComponent(); even there is a line for calling such method.

I would like to know where i can view the code of InitializeComponent(); and how to control the position of drop down menu?

Thank you

battula32
March 6th, 2006, 09:32 AM
Use Contexmenu at desing time It will be better, And add That Context menu to the ToolBar button to which button You need Drop button.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboricontextmenucontrolprogramming.asp

Regards
Ravi