473,466 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sendinput example desperately needed

Hi, Can anyone send me a working example of using the sendinput API with
VB.NET to send keystrokes and mouse commands to other active windows? I’ve
been struggling with this for ages and just cant get it to work. Please don’t
direct me to documentation on MSDN or elsewhere – I’ve looked at all of this
and still cant get it to work!! My code doesn't report any errors, it just
doesn’t seem to send any input to whatever has the focus. Most of the posts
I’ve found elsewhere make it sound so simple – could there be a security
‘feature’ on my machine preventing this from working? I’m using XP SP2, .NET
1.1 and I also use Zonealarm Pro.

Lou.

Nov 21 '05 #1
2 4274
Have you looked at the SendKeys class? This allows you to send keystrokes to
the active application, but I don't know how you would send mouse events
other than using the SendInput API.

"Louise" <Lo****@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hi, Can anyone send me a working example of using the sendinput API with
VB.NET to send keystrokes and mouse commands to other active windows? I've
been struggling with this for ages and just cant get it to work. Please don't direct me to documentation on MSDN or elsewhere - I've looked at all of this and still cant get it to work!! My code doesn't report any errors, it just
doesn't seem to send any input to whatever has the focus. Most of the posts I've found elsewhere make it sound so simple - could there be a security
'feature' on my machine preventing this from working? I'm using XP SP2, ..NET 1.1 and I also use Zonealarm Pro.

Lou.

Nov 21 '05 #2
Have you looked at the SendKeys class? This allows you to send keystrokes to
the active application, but I don't know how you would send mouse events
other than using the SendInput API.

"Louise" <Lo****@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hi, Can anyone send me a working example of using the sendinput API with
VB.NET to send keystrokes and mouse commands to other active windows? I've
been struggling with this for ages and just cant get it to work. Please don't direct me to documentation on MSDN or elsewhere - I've looked at all of this and still cant get it to work!! My code doesn't report any errors, it just
doesn't seem to send any input to whatever has the focus. Most of the posts I've found elsewhere make it sound so simple - could there be a security
'feature' on my machine preventing this from working? I'm using XP SP2, ..NET 1.1 and I also use Zonealarm Pro.

Lou.

Nov 21 '05 #3

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

Similar topics

1
by: Matthew Kelly | last post by:
I have pulled together a VB.net project that hooks the keyboard (Ref. Paul Kimmel's hooking program) and allow the user to send "mouse right clicks" via the SendInpuut function (mouse emulation...
6
by: Richard A. Lowe | last post by:
I'm using P/Invoke to call SendInput (using code culled from these newsgroups!) to send mouse events to a window. But I'm unsure how to send double-clicks. A VB6 article I saw on SendInput...
0
by: Logan McKinley | last post by:
need my C# app to send a character to a different application. I believe I need to use the SendInput API call and to pass a KEYBDINPUT struct into that but I am lost past that point. Here is the...
2
by: Gene Vital | last post by:
Hi All, I am trying to use the SendInput API call in C# to put a keypress in the keyboard buffer and have beeting my head against the wall all morning. Could someone help me out with this, I...
2
by: kumar_subrahmanya | last post by:
Hi, I am facing problems in sending mouse clicks via SendInput API. Mouse clicks are being sent but at the X,Y co-ordinates. I am mapping my monitor to the (0,0,65535,65535) virtual monitor as...
1
by: kumar_subrahmanya | last post by:
Hi, I am facing problems in sending mouse clicks via SendInput API. Mouse clicks are being sent but at the X,Y co-ordinates. I am mapping my monitor to the (0,0,65535,65535) virtual monitor as...
7
by: Sin Jeong-hun | last post by:
Hi. I need to simulate keyboard and mouse events. For the first step, I tried to move mouse using SendInput. But it didn't work. I searched all over the internet for an example, but only questions...
2
by: =?Utf-8?B?TXJOb2JvZHk=?= | last post by:
I am trying to find a good example of SendInput. Doing a search on google I found two, one is incomplete and vague from the start and the other I copied the code and tried running it and it was...
1
by: Adam W. | last post by:
I'm at the last stage of my project and the only thing left to do is trigger a mouse click. I did some searching around for example code and stumped upon SendInput...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.