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

SendKeys.Send()

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
Nov 21 '05 #1
4 5260
Perhaps if you set the service to allow it to interact with the desktop?

Maybe?

"atr2000" <jo********@notreal.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
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

Nov 21 '05 #2
How do you do that?

"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
Perhaps if you set the service to allow it to interact with the desktop?

Maybe?

"atr2000" <jo********@notreal.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
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


Nov 21 '05 #3
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.

"atr2000" <jo********@notreal.com> wrote in message
news:e9**************@TK2MSFTNGP09.phx.gbl...
How do you do that?

"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
Perhaps if you set the service to allow it to interact with the desktop?

Maybe?

"atr2000" <jo********@notreal.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
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



Nov 21 '05 #4
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.

"atr2000" <jo********@notreal.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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.

"atr2000" <jo********@notreal.com> wrote in message
news:e9**************@TK2MSFTNGP09.phx.gbl...
How do you do that?

"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
> Perhaps if you set the service to allow it to interact with the
> desktop?
>
> Maybe?
>
> "atr2000" <jo********@notreal.com> wrote in message
> news:Or**************@TK2MSFTNGP10.phx.gbl...
> > 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
> >
> >
>
>



Nov 21 '05 #5

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

Similar topics

0
by: Mr. Bungle | last post by:
I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results) Private Sub...
5
by: Mike | last post by:
I want to be able to open the printer popup screen while a report is on the screen. I would like to have a button on one of the menus that sends the "control P" combination. In the past, I...
5
by: Wayne Gibson | last post by:
Hi, Was wondering if somebody could help.. I'm trying to use Sendkeys on a Windows forms. I have entered the following command to simulate a CTRL+ALT+1.. ...
2
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the...
1
by: GrantS | last post by:
I need to use a sendkeys key combination to automate the "accept files" that a remote user wants to send to me via Windows messenger. I am using automation to work with Windows Messenger client in...
6
by: Gary | last post by:
Hi, I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)") This is not working ..what could be the...
2
by: MLH | last post by:
I have the following code with a SendKeys statement in it. 100 If Me.Dirty Then MsgBox "Form is Dirty!" 120 Dim MyQ As String, MyTitle As String, Response As Boolean 140 MyQ =...
4
by: davermcl | last post by:
Hi, I'm experiencing a problem when using the VB SendKeys method. I'm sending characters to a textbox in another application. It works fine when the Windows Input Languages on both apps are...
0
by: neonspark | last post by:
I'm buidling some simple macro functionality for my app so the users can record a sequence of keyboard inputs and replay them reliably via some menu. Originally, I used: protected override bool...
1
by: Boki | last post by:
Hi All, I am trying to create a auto login program. Below is the part of code, my issue is - the target form ( handle / window ) usually didn't perform the key I sent from my C# program...
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: 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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.