Results 1 to 4 of 4

Thread: [RESOLVED] when all the controls are in disenable position only the keyAscii is worikg.. how to

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Resolved [RESOLVED] when all the controls are in disenable position only the keyAscii is worikg.. how to

    Hi all!,
    suppose if i want to find either keyAscii or keycode of a paricular key on a form
    egg:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    MsgBox (KeyCode)

    End Sub

    it will work only, if the controls(asume form contains text boxes,command buttons..) on a form should be set to Enabled=false
    How can i find the either keyAscii or keycode, of a paricular key, even if i did not set the controls' property enabled=false

    Thanks in advance:
    regards:
    raghunadhs

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: when all the controls are in disenable position only the keyAscii is worikg.. how to

    Set the KeyPreview Property of the form to True
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: when all the controls are in disenable position only the keyAscii is worikg.. how to

    Hi Mark Gambo!
    Thats great,.. its working...
    Thank you,
    regards:
    raghunadhs.

    Quote Originally Posted by Mark Gambo
    Set the KeyPreview Property of the form to True

  4. #4
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: when all the controls are in disenable position only the keyAscii is worikg.. how to

    No problems, don't forget to mark this thread as resolved!
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


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