Results 1 to 5 of 5

Thread: Shortcut Keys dilema

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Location
    India
    Posts
    227

    Re: Shortcut Keys dilema

    Quote Originally Posted by seenu_1st View Post
    u can use KeyDown event, try like this
    Code:
    Private Sub Command1_Click()
    MsgBox "Hi"
    End Sub
    
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If Shift = 2 And KeyCode = Asc("A") Then 'Ctrl+A
        Command1_Click
    End If
    End Sub
    
    Private Sub Form_Load()
    Me.KeyPreview = True
    End Sub
    there r some other methods also
    Thanks for your help but I have already done this. But the keypreview does not work at times especially when a combo box has focus.

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: Shortcut Keys dilema

    Quote Originally Posted by yogiyang View Post
    Thanks for your help but I have already done this. But the keypreview does not work at times especially when a combo box has focus.
    i tried with combobox too, it works fine, can u post ur code or attach the project as zip?
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


Tags for this Thread

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