468,310 Members | 1,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,310 developers. It's quick & easy.

Is there a better way for "AppActivate"

Hello All,

I am trying to use SendKeys to send some keystrokes to another application.
I am using the VB Runtime reference to use the following line in my C#
program:

Microsoft.VisualBasic.Interaction.AppActivate(pid) ;

Afterwards I am using the SendKeys.Send() function to send some keystrokes
to the application.

Now this works fine if the application I am trying to activate is not in the
system tray. But that is my problem I don't know if the application is in the
system tray (in which case the line throws an System Argument Exception).

Is there a better what to do this in C#?

Thanks,

Scott

Jan 25 '06 #1
1 2355
Hi Scott,

I am having similar issues with this in VB. Are you using the Shell command
to generate the PID? If so, what appearance behaviour are you giving it?

regards,

Mac

scottt wrote:
Hello All,

I am trying to use SendKeys to send some keystrokes to another application.
I am using the VB Runtime reference to use the following line in my C#
program:

Microsoft.VisualBasic.Interaction.AppActivate(pid );

Afterwards I am using the SendKeys.Send() function to send some keystrokes
to the application.

Now this works fine if the application I am trying to activate is not in the
system tray. But that is my problem I don't know if the application is in the
system tray (in which case the line throws an System Argument Exception).

Is there a better what to do this in C#?

Thanks,

Scott


--
Message posted via http://www.dotnetmonster.com
Feb 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

220 posts views Thread by Brandon J. Van Every | last post: by
3 posts views Thread by Muhd | last post: by
24 posts views Thread by Faith Dorell | last post: by
43 posts views Thread by Rob R. Ainscough | last post: by
33 posts views Thread by Protoman | last post: by
22 posts views Thread by JoeC | last post: by
19 posts views Thread by Alexandre Badez | last post: by
23 posts views Thread by mike3 | last post: by
3 posts views Thread by Ryan Liu | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.