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

sending event

How do I send a mouse or keyboard event(vb.net) without touch(using) either?

DT
Jul 21 '05 #1
7 3133
Dayne,

The result from a mouse of a keyboard event will be an action. (method)
Therefore why do you not just call that action.

Just my thought,

Cor
"Dayne" <d_**********@hotmail.com>
...
How do I send a mouse or keyboard event(vb.net) without touch(using)
either?

DT

Jul 21 '05 #2
"Dayne" <d_**********@hotmail.com> schrieb:
How do I send a mouse or keyboard event(vb.net) without touch(using)
either?


Keyboard events: 'SendKeys.Send'.

Mouse events/keyboard events: P/invoke on 'mouse_event'/'keybd_event' or
'SendInput'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Jul 21 '05 #3

I am getting the following error when using "SendKey". Any idead?

A first chance exception of type 'System.InvalidOperationException'
occurred in system.windows.forms.dll

Additional information: SendKeys cannot run inside this application
because the application is not handling Windows messages. Either change
the application to handle messages, or use the SendKeys.SendWait method.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4

I need to reset the clock tick count
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

I tried using SendKeys.SendWait("A") to set the "Last input value" .. it
doesn't work. Any idea?

DT

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #6
What clock tick count? What clock?

SendKeys is the same as setting the focus to a windows text element on
another application, and typing into it.

It's very unreliable, and a hack at best. Any window at any time can take
the focus, and receive the SendKeys.

Jeff

"Da Tr" <d_**********@hotmail.com> wrote in message
news:#a**************@TK2MSFTNGP15.phx.gbl...

I need to reset the clock tick count
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #7
Could you expand a little on sending say, MouseDown event...what's the exact
syntax? Thanks for help.

"Herfried K. Wagner [MVP]" wrote:
"Dayne" <d_**********@hotmail.com> schrieb:
How do I send a mouse or keyboard event(vb.net) without touch(using)
either?


Keyboard events: 'SendKeys.Send'.

Mouse events/keyboard events: P/invoke on 'mouse_event'/'keybd_event' or
'SendInput'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Jul 21 '05 #8

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

Similar topics

1
by: Perttu Pulkkinen | last post by:
I use hit two function to stop from sending the form. First one I use to move focus to the next desired field, second one to do nothing (when there is no desired field to go). Works in IE &...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
4
by: John Sutor | last post by:
I currently have an event handler setup to handle keypress events. the handler only takes the same arguments as the keypress event (object sender, System.Windows.Forms.KeyPressEventArgs e). I...
7
by: Jay Douglas | last post by:
Hello all, I have a asp.net page that creates a pdf on the fly and sends the pdf down to the browser. When calling the page up in IE the Page_Load event is fried twice. This doesn't happen with...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
4
by: Trollpower | last post by:
Greetings, im totally new to ASP.Net, so i hope you can help me out here. Ive got some ActiveX Controls, which work great with Windows Forms. Now i have to do some work with ASP.Net, where i...
6
by: Dayne | last post by:
How do I send a mouse or keyboard event(vb.net) without touch(using) either? DT
2
by: Kups | last post by:
Hi! I have a service and client that use WSE 2.0 and soap.tcp. Both are behind firewalls. Client connects to a public machine's tcp port which is redirected to service. If I send a request ...
6
by: rekaeps | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles sending e-mail from the server when accessing the web site from a separate client computer. Also, in the same scenario,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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...

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.