sending event

  • Thread starter Thread starter Dayne
  • Start date Start date
D

Dayne

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

DT
 
Dayne said:
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'.
 
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
 
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.
 
I tried using SendKeys.SendWait("A") to set the "Last input value" .. it
doesn't work. Any idea?

DT
 
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
 
Could you expand a little on sending say, MouseDown event...what's the exact
syntax? Thanks for help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top