Re: SendKeys under Windows Vista with VB3

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"jvsp" <vinisanp@xxxxxxxxx> wrote in message news:EEE63F6C-8E48-4125-ACA4-27495B525B06@xxxxxxxxxxxxxxxx

Hi Mike, thanks for your answer. I tried use your code
on vb3 but i can't it work on vb3. On vb3 doesn't exists
the type "Byte".

So what happens if you change the declaration to use Integers instead of bytes? In other words, change this:

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

to this:

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

What happens if you run the code after making those changes? I assume that VB3 can use Integers (two byte variables) and Longs (four byte variables)? If not, what kind of variables can it use?

Mike




.



Relevant Pages

  • Re: SendKeys under Windows Vista with VB3
    ... on vb3 but i can't it work on vb3. ... ByVal dwFlags As Long, ByVal dwExtraInfo As Long) ... (ByVal bVk As Integer, ByVal bScan As Integer, _ ...
    (microsoft.public.vb.general.discussion)
  • Re: SendKeys under Windows Vista with VB3
    ... "Randy Birch" wrote: ... on vb3 but i can't it work on vb3. ... ByVal dwFlags As Long, ByVal dwExtraInfo As Long) ...
    (microsoft.public.vb.general.discussion)
  • Re: Was tun wenn SendKeys. zu langsam ist ?
    ... ByVal bScan As Byte, _ ... ByVal bVk As Byte, _ ... ByVal dwFlags As UInteger, _ ... ByVal dwExtraInfo As UIntPtr) ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Send Keystroke to another Application
    ... ByVal bVk As Byte, _ ... ByVal bScan As Byte, _ ... ByVal dwFlags As Long, _ ... ByVal dwExtraInfo As Long) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Clipboard
    ... ByVal bScan As Byte, _ ... ByVal dwFlags As Long, _ ... ByVal dwExtraInfo As Long) ... Private Sub Command1_Click ...
    (microsoft.public.vb.general.discussion)