sending event

  • Thread starter Thread starter Dayne
  • Start date Start date
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.
 
Back
Top