Jump to content
Xtreme .Net Talk

I am trying to set focus to an application using AppActivate


Recommended Posts

Posted

I am trying to develop a asp.net web application using VB.net to set focus to an application and sendkeys to it. I have used the following code on Page_Load event and get the same error each time:

 

Exception Details: System.ArgumentException: Process 'Calculator' was not found.

 

Source Error:

 

 

Line 23: Dim MyAppID, ReturnValue

Line 24: ' In Microsoft Windows:

Line 25: AppActivate("Calculator") ' Activate App

Line 26:

Line 27: '' AppActivate can also use the return value of the Shell function.

 

Calculator is running and the Title bar is ("Calculator")

 

Please Help.

  • 1 year later...
Posted
I tried the same code in the form_load event using straight vb.net and it worked fine. I don't use asp.net but a my guess would be that if this code is running on the server then it can't see the applications running on the client.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...