Results 1 to 5 of 5

Thread: sendkeys problems

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking

    I'm trying to send the following keys from a command botton:
    tab + alt in order to call all minimized APPs but it does not work.

    What can be wrong in this simplest instruction?
    sendkeys "%{tab}"
    because it does nothing at all.

    Do you know any other way?

  2. #2
    Addicted Member
    Join Date
    Jun 2000
    Posts
    175
    I think it works

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Const VK_TAB = &H9
    Private Const VK_MENU = &H12
    Private Const KEYEVENTF_KEYUP = &H2

    Private Sub Command1_Click()
    'Alt Down
    keybd_event VK_MENU, 0, 0, 0
    'Tab Pressed
    keybd_event VK_TAB, 1, 0, 0
    'Alt Up
    keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0

    End Sub
    Mass

  3. #3
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305
    isn't the symbol for "alt" ^ ??

  4. #4
    Addicted Member
    Join Date
    Jun 2000
    Posts
    175
    You may be right but I checked the code, it works fine.
    you can omit the alt up to see what you want to choose.

    Mass

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking ok

    It works fine.

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