CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2002
    Posts
    42

    Unhappy How to have main menu in a control?

    Hi,

    I am trying to create a control project with a menu on the top. It seems I cannot add main menu control to my control and I do not want to use contextmenu since I need the users to see it without doing anything.
    Could anyone please give some suggestions?
    Thanks

    Chris

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    if it is a Custom Control Page
    you can drop a Context menu and activate it by programatically
    other wise if it is a User Control
    and Windows Control Library then
    you have to add the context menu and
    select the particular control and set
    its
    "Context Menu" property to the just added
    Contextmenu1
    so that its now assigned. and now on right click the menu should come.

    thanx
    Paresh

  3. #3
    Join Date
    Oct 2002
    Posts
    42
    thanks. Yeah, I used contextmenu, but I do not want user to right click to get it, instead, I would like the menu will show up as part of the control on the top. Any suggestions?

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    Ahh , then you need to use the
    MainMenu on Forms. make sure that applications are MDI based and you handle the windows properly. like min/max etc...

    Paresh

  5. #5
    Join Date
    Oct 2002
    Posts
    42
    the problem is that when I started a window control lib project in Visual Studio .NET, the MainMenu option is gray. I simply cannot move it to my form.
    What does MDI mean?
    Thanks

  6. #6
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    MDI is Multiple document interface.
    if MainMenu is gray then you need to use that manually.

    for example.

    make usual windows app. and make a form. drop that mainmenu and
    copy paste the code in ur control code.

    Paresh

  7. #7
    Join Date
    Oct 2002
    Posts
    42
    will try. thanks

  8. #8
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    yes, try and let me know how it works etc.

    how does it look etc...

    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured