Is there a better way for "AppActivate"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

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