VB.net Menubar

VB.net Menubar

Anonymous
Not applicable
1,693 Views
2 Replies
Message 1 of 3

VB.net Menubar

Anonymous
Not applicable

I need to add menubar for my application.

iam using autocad 2015 and Vs 2012 vb.net.

 

i need the mainmenu and sub menu 

then the submenu linked with my module to open login form 

 

i import these namespaces

 

Imports Autodesk.AutoCAD.Windows
Imports Autodesk.Windows

 

any help plz?

0 Likes
Accepted solutions (1)
1,694 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor
Accepted solution

You may want to make things a bit clearer: do you want to add menu in your own UI (your modal/modeless dialog form; or do you want to add menu item to AutoCAD's menu (Ribbon menu, I suppose)?

 

For the former, you simply drag menu/toolbar control from ToolBox to your form in VisualStudio design mode...

 

For the latter, I'd suggest to first consider to customize *.cuix file, so that you can define menu/ribbon item to run your application (be it is for logging in or something else). This is the easiest and most common way to make AutoCAD run custom apps/commands.

 

If you have to dynamically create menu/ribbon item by your code (that is, you have to get your application load first), then, yes, you need to set reference to acWindows.dll and adWindows.dll (mostly you only need AdWindows.dll) And then in VS' Object Browser, you can look for "Autodesk.Windows.Ribbonxxxx".

 

This link would get you started:

 

http://adndevblog.typepad.com/autocad/2012/07/modify-ribbon.html

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

thanks norman
now i already created riboon button and my question how to control the size of ribbon button ?

0 Likes