By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,017 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,017 IT Pros & Developers. It's quick & easy.

SendInput Function Question

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.