473,396 Members | 1,895 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,396 software developers and data experts.

SendInput Function Question

aam
I'm trying to find a code sample on how to use the SendInput Function to
simulate a mouse click on a button of another form. I've looked all over and
can't find one. Thanks.
Nov 21 '05 #1
7 5717
Aam,

Why are you looking for that because there is a method button.click. However
maybe you mean a mouseclick in another program.

Cor
Nov 21 '05 #2
"aam" <aa*@discussions.microsoft.com> schrieb:
I'm trying to find a code sample on how to use the SendInput Function to
simulate a mouse click on a button of another form. I've looked all over
and
can't find one.


Didn't the 'mouse_event' sample written by Nick work?

<URL:http://groups.google.de/groups?selm=eqFfJBU%24EHA.2196%40TK2MSFTNGP14.phx. gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
aam
yes cor the mouse click is for a button in another application.not my own.

"Cor Ligthert" wrote:
Aam,

Why are you looking for that because there is a method button.click. However
maybe you mean a mouseclick in another program.

Cor

Nov 21 '05 #4
aam
no . it was written as a console app in vb. i'm using a win app in vb.net. i
have seen samples on how to do this in vb, but nothing in vb.net. the
mouse_event function has been superseded in win nt/2000/xp. you are to use
SendInput function instead. i have used Google to search SendInput in Vb.net
and have noticed the question has been asked numerous times in many different
forums with no replies. it seems like this is a very tough question that many
people are having trouble with. thanks for any help.

"Herfried K. Wagner [MVP]" wrote:
"aam" <aa*@discussions.microsoft.com> schrieb:
I'm trying to find a code sample on how to use the SendInput Function to
simulate a mouse click on a button of another form. I've looked all over
and
can't find one.


Didn't the 'mouse_event' sample written by Nick work?

<URL:http://groups.google.de/groups?selm=eqFfJBU%24EHA.2196%40TK2MSFTNGP14.phx. gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
"aam" <aa*@discussions.microsoft.com> schrieb:
no . it was written as a console app in vb. i'm using a win app in vb.net.
All you have to do is to /copy/ the code from the console app and /paste/ it
to the Windows Forms app. What's the problem?!
have seen samples on how to do this in vb, but nothing in vb.net. the
mouse_event function has been superseded in win nt/2000/xp. you are to use
SendInput function instead.


'mouse_event' should still work...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
aam
Herfried, when i look up the mouse_event function in platform sdk of the
msdn library for visual studio .net 2003, it states in windows nt/2000/xp
that the mouse_event has been superseded and to use SendInput instead. i run
win xp pro edition and i can't figure out how the SendInput function works.
thanks.

"Herfried K. Wagner [MVP]" wrote:
"aam" <aa*@discussions.microsoft.com> schrieb:
no . it was written as a console app in vb. i'm using a win app in vb.net.


All you have to do is to /copy/ the code from the console app and /paste/ it
to the Windows Forms app. What's the problem?!
have seen samples on how to do this in vb, but nothing in vb.net. the
mouse_event function has been superseded in win nt/2000/xp. you are to use
SendInput function instead.


'mouse_event' should still work...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7
"aam" <aa*@discussions.microsoft.com> schrieb:
when i look up the mouse_event function in platform sdk of the
msdn library for visual studio .net 2003, it states in windows nt/2000/xp
that the mouse_event has been superseded and to use SendInput instead. i
run
win xp pro edition and i can't figure out how the SendInput function
works.


Well, all I wanted to say is that 'mouse_event' still works for
compatibility reasons on Windows XP Professional, so, if you don't find a
solution using 'SendInput', you can use 'mouse_event'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #8

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

Similar topics

1
by: Barb | last post by:
I am using SendInput to read a line from a file and then simulate typing it into an Edit Control box using SendInput. When I read a file with multiple line, the output file saves the original first...
3
by: David Harris | last post by:
Is there a sendinput function in Visual Studio .net beta 2? I don't see the namespace that you must include for the sendinput function listed on msdn2.microsoft.com. David Harris
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...
5
by: Tim | last post by:
Hello All, I am writing a program that checks for the NumLock status and turns the NumLock on if it is off. I'm not sure what I'm overlooking at this point, but the code will compile and run, but...
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...
1
by: ^Def_JaM^ | last post by:
I need a working sample of how to use the "SendInput" (as described in the WinAPI) method to emulate Unicode keystrokes. Most important is the fact that SendInput sample must be able to send Unicode...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.