Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to make shortcut/hotkey

How to make shortcut/hotkey

Scheduled Pinned Locked Moved Visual Basic
questionhelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cometz
    wrote on last edited by
    #1

    I can't use certain key(ex:Enter key) for shortcut when the focus is on the datagrid. I already tried to use the datagrid KeyDown events but it seems not work right. I must click the rowheader and then the Enter key(the shorcut I use) to fire the keydown event. If i don't do this the events seem not work even if i already use the command datagrid.focus() to focus to the datagrid. I also notice that i can't use the arrow key (Up and down key) to select the row i want. The triangle point at the row header move when i use the arrrow keys but again i can't use the shortcut (Enter Key) to make selection. It really bothers me to use mouse every time i want to make a row selected. I'm also try several other method to accomplish this. I tried to use the form keydown events and already set the form KeyPreview property to true, I also tried to use the overrides PreProcessMessage function but the problem cannot be solved. The last method I use is using the menu control and set each of the menu shortcut and it work great(it work for the whole form and this is the way i want it) but the shorcut is limited. I can't use the Escape key or the Enter Key. how can i make a hotkey method to function just like the menu control does(cover the whole form or maybe within the whole application but not outside the application) and also take other shortcut which the menu control doesn't have? or perhaps you have other great idea on how to solve the problem. Thanks.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups