MainMenu in 2005?

C

cj

I don't see the mainmenu item in the toolbox of 2005. I guess I haven't
created a project in 2005 using it yet. I know I upgraded some from
2003 to 2005 and they show the control mainmenu on the form1.vb design
page. What do I use? Menustrip?
 
C

cj

Ah, so in upgraded projects it uses menustrip but changes the name to
MainMenu1 as that is what it was called in 2003.
 
J

Jeffrey Tan[MSFT]

Hi Cj,

Yes, the .Net1.1 MainMenu component is a simple wrapper around the Win32
menu support, which provided limited extensible function to the Winform
developer, so are ToolBar, StatusBar and ContextMenu. So the Microsoft
Winform team introduced new ToolStrip, MenuStrip, StatusStrip,
ContextMenuStrip components in .Net2.0 to replace ToolBar, MainMenu,
StatusBar and ContextMenu. These new components provided much more complex
and richer extensible function.

This initiative is covered in the link below:
http://windowsforms.net/WhidbeyFeatures/default.aspx?PageID=2&ItemID=14&Cat=
Controls&tabindex=5

Since there are 8 components in .Net2.0 now, to not introduce any
confusion, .Net Winform team just removes the old .Net1.1 components from
the ToolBox and recommend developers to use the new components suite. Also,
you still can follow the steps provided by "Kerry Moorman" to add the new
components back.

Additionally, http://www.windowsforms.net is the first official Winform
site maintained by Microsoft. You may find much useful information on it.
More specific, the following page is the official homepage for Winform
Net2.0. It contains most of the new features in .Net2.0, including FAQs,
samples, presentations etc... It should provide you a short cut of learning
Winform2.0:
http://windowsforms.net/Default.aspx?tabindex=1&tabid=60

Hope it helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

cj

I suppose this change is why the menu strip when used as a main menu
seems to take form space. For instance if I have a menu strip main menu
and then I put a label on the form at position 4,10 it overlaps the
menu. In programs converted from 2003 with a main menu in them if I add
a label to the form and position it at 4,10 it doesn't overlap the menu.
 
J

Jeffrey Tan[MSFT]

Hi Cj,

Yes, you are right.

MainMenu encapsulates Win32 menu resource to implement the main menu, its
area is considered as non-client area(like the caption bar which is also
the non-client area) on a form. Since the Label control can only occupy the
client area of the form, so label control can not overlap the MainMenu area.

MenuStrip provides more extensible behavior, so it did not use the Win32
menu resource, but created a customized control to simulate the menu
effect. If you use Spy++ to view the MenuStrip control structure, you will
see MainMenu is not considered as a control, but MenuStrip is recognized as
a control. Its window class name is something like this:
"WindowsForms10.Window.8.app.0.33c0d9d". As a normal control, MenuStrip
occupies the client area of the form, so the label control can overlap the
MenuStrip.

Hope this is clear.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top