Results 1 to 3 of 3

Thread: [RESOLVED] How to add a menu item programmatically

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Location
    Toledo, OH
    Posts
    785

    Resolved [RESOLVED] How to add a menu item programmatically

    Hello, i need to add a menu item to a menu already created.

    This needs to be done upon a certain action the user is doing.

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: How to add a menu item programmatically

    Add to the parent, and then add a function to handle the menu press...


    Dim mnuItemNotes As New MenuItem
    mnuItemNotes = New MenuItem
    mnuItemNotes.Text = "Add new note..."
    mnuiNotes.MenuItems.Add(mnuItemNotes)
    AddHandler mnuItemNotes.Click, AddressOf mnuItemNotes_Click


    Public Sub mnuItemNotes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    Process_Order_Item_Notes(sender, lvSummary)

    End Sub
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Location
    Toledo, OH
    Posts
    785

    Re: How to add a menu item programmatically

    thank you for the response, I figured it out, i think I found it on MSDN. Thank you that's exactlly what I did.

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