Results 1 to 4 of 4

Thread: Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    91
    Previous Message:

    I would like to make a Access Database with hidden buttons that can be accessed by pressing something like ctrl+Alt+b. How can I do this? Also while Im at it if i create a database using a access database the end user doesnt have to have access do they? (the buttons would be in the vb application)




    Now couldn't I use this for that:


    Code:
    Private Declare Function GetAsyncKeyState Lib "user32"
    (ByVal vKey As Long) As Integer
    
    Private Sub Form_Load()
        Timer1.Interval = 50
    End Sub
    
    Private Sub Timer1_Timer()
        If GetAsyncKeyState(vbKeyControl) And GetAsyncKeyState(vbKeyEscape) Then command1.show
    End Sub
    Or something simular?
    Patience with me Please! I'm Learning!

    Self Learning Newbie
    VB 6 Pro SP4

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    This seems to work but im not to sure how to simulate something like a hotkey sequence.
    The Ascii chart doesnt seem to give any values for Alt or Ctrl keys. I tried If KeyAscii = 32 And KeyAscii = 27 Then but it doesnt seem to work. but i think that would be the way to go. Good Luck!!

    Option Explicit

    Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 32 Then ' spacebar
    Command1.Visible = True
    End If
    End Sub

    Private Sub Form_Load()
    Command1.Visible = False
    End Sub

  3. #3
    Guest
    You can make hidden menu items - menu items can automatically have shortcut keys.

    Make first a menu that is not visible, under it you can make as many hidden menus as you want.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    91

    Thumbs up Thanks

    Thanks I might try that instead!
    Patience with me Please! I'm Learning!

    Self Learning Newbie
    VB 6 Pro SP4

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