Results 1 to 3 of 3

Thread: Please read this about my question about Edit in Notepad.

  1. #1

    Thread Starter
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    Make the menu on the main form as normal, but make the top-most item invisible.

    Eg

    mnuMyCustom "Custom Menu"
    --mnuEditInNotepad "Edit In Notepad"
    --mnu... "....."
    --etc etc etc

    Then, when you want the menu to popup - normally in a mousedown event;

    PopUpMenu [formname].mnuMyCustom

    Look up help for PopUpMenu for more information.
    When the menu item is selected from the popupmenu any code attached to the Click event of the menu is run (as normal). However, this isn't ideal as you normally want to write the code in the function that pops the menu up - in that case this is what I do..

    On the form where the menu is (normally the main form) - for this example it is frmMain.

    Public MenuSelected as Integer

    In each click event of the items on the customer menu;

    MenuSelected= [unique number]

    In the code where you want the menu to popup;

    frmMain.MenuSelected=-1
    PopUpMenu frmMain.mnuMyCustom
    select case frmMain.MenuSelected
    case -1
    (no items were selected from the menu)
    case 1
    (do whatever you want the menu item where you set menuselected=1 to do)
    case 2
    ....

    etc

    End Select


    Hope this make sense..

    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



  2. #2
    Lively Member
    Join Date
    Jul 1999
    Posts
    87

    Post

    Oooops, really sorry, I forgot to tell that this was a continue of a previous message, that hadn't anything to do with Visual Basic, just how to make my own menuitem in explorer. =)
    Sorry.

  3. #3
    Lively Member
    Join Date
    Jul 1999
    Posts
    87

    Post

    Does anyone know how to made a Cascading menu ?
    Which I can put some custom commands in ?

    Like:

    My Custom
    |___Edit In Notepad
    |___Some Stuff
    |___Some other Stuff

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