SendKeys.Send()

A

atr2000

How can I perform a SendKeys.Send to the current active application from a
windows service? Or is there a different way to do this?

I currently receive the following error message:

System.InvalidOperationException: SendKeys cannot run inside this
application because the application is not handling Windows messages.

Thanks in advance,
atr2000
 
R

Ray Cassick \(Home\)

Perhaps if you set the service to allow it to interact with the desktop?

Maybe?
 
A

atr2000

Okay I found that. Located in the Services Properties.

I have another question: How do I sendkeys to the currently active cursor
location of the current running application? I am trying to develop a
Remote Desktop Application in VB.NET.
 
R

Ray Cassick \(Home\)

As far as I remember, sendkeys will send keystrokes to where the cursor
currently is located. Where ever the cursor is and what ever window has
focus at the time of the function call will get the keys.
 

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

Top