Results 1 to 2 of 2

Thread: [2005] drop item

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    [2005] drop item

    how to add dropdown item in a menu w/ shortcut key? what code should i write?

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [2005] drop item

    You would need to capture the KeyDown event of your form and check to see if the keys pressed were your shortcut keys and if so, bring up a dialog box that lets the user enter the text they want to be added to the drop down, then add it like so:
    vb Code:
    1. Dim UserInput As String
    2. 'Set the UserInput string value from a text box etc here
    3. MyComboBox.Items.Add(UserInput)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


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