473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Send Keystroke to another Application

Hi there, how can i send keystrokes (with vb.net ! )when i not wanna use
sendkeys ?
i have tryed
Private Declare Sub keybd_event Lib "user32" Alias "keybd_event" ( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

keybd_event(65, 0, 0, 0)
keybd_event(65, 0, KEYEVENTF_KEYUP, 0)

but i got an PInvoke error.
when i try to sendmessage can i here send for example
strg + a
or
alt + l
??
greetings
Apr 5 '08 #1
1 4660
"Stefan Reinmers" <sr*******@gmail.comschrieb
Hi there, how can i send keystrokes (with vb.net ! )when i not wanna
use sendkeys ?
i have tryed
Private Declare Sub keybd_event Lib "user32" Alias
"keybd_event" ( _ ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

keybd_event(65, 0, 0, 0)
keybd_event(65, 0, KEYEVENTF_KEYUP, 0)

but i got an PInvoke error.
when i try to sendmessage can i here send for example
strg + a
or
alt + l
??
greetings
As I have told you already in the German group, the declaration is still
wrong, and the MSDN lib says that the function has been replaced by the
SendInput function, however it can still be used - if declared
correctly.
Armin

Apr 5 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: hokieghal99 | last post by:
Does anyone know of a keystroke logger that has been written in Python for Windows machines? I'd like to see such a script and use it as a point of reference for a real-time backup project that I'm...
5
by: Aaron | last post by:
In a console based application, I'd like to pause for a keystroke. I thought Console.Read would do the trick, but after it didn't I found this on the MSDN description of the function: ...
2
by: Christian Blackburn | last post by:
Hi Gang, I would like to send the Alt+A keystroke to a Window. What's the best way to go about that? This didn't seem to work. What message should I work with WM_KEYDOWN and WM_KEYUP are...
3
by: Str Noetika | last post by:
Hi, How can I send ctrl keys (like ctrl A, ctrl C) from a VB application to another existing application (like word, excel...) ? I tried to send postmessages like...
0
by: scorpion53061 | last post by:
I need to send this keystroke to a vb.net application. This came from ethereal. Here is its value in "Hex Dump" 00000000 1b 65 0d .e. Here is its...
4
by: =?Utf-8?B?QWxleGFuZGVy?= | last post by:
Hi! I am new to C#. I read two C# books in the last two days which only covered the basics. And now I am on my third day. The books were really bad, because they did not cover windows applications,...
2
by: =?Utf-8?B?bWFib25k?= | last post by:
Hi don't know if this is the best forum or if my request is possible...hope someone out there can suggest a pointer for me. I want to to be able to send a keyboard keystroke (specifically the...
0
by: ionphoenix | last post by:
i to send data or keystroke to a non active emulator or application using vb. its like the input will be done in vb.net but in the background it will input it into the emulator.i need help badly i...
0
by: revacdm20635 | last post by:
hi, I am working in VB.NET 2003(.NET Framework 1.1). I want to send the key Enter or Space to the process. My code is <CODE>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.