1

I am looking at setting up an automation around a Windows program and ideally want a dedicated virtual screen in which to run, even better if it could have a virtual mouse and keyboard in that domain, all controlled by a vb.net program. The program I want to control doesn't have an API or a COM interface or anything as it is very old, and I don't want the user of the vb.net program to be able to interrupt the process by moving the mouse or using the keyboard. In the worst case the user would have to stop and watch the automation occur, but I want a better user experience by virtualising the process.

The process is started using Process.Start(), though I'm not married to that method.

Is this possible? Is any of it possible or is the Windows graphics pipe etc. impossible to redirect?

J Collins
  • 2,106
  • 1
  • 23
  • 30
  • Not sure how well it would work, but you could set the window location to be off the screen. You could send events directly to the window in order to avoid the user messing things up. See https://stackoverflow.com/a/5084190/139794. – Darryl Jun 16 '20 at 20:34
  • I can see that working somewhat for keyboard input, but I'm not sure how to make that work for mouse input, sending clicks to an impossible coordinate off screen. Also would not the keyboard still be able to interrupt the process should keys be pressed? – J Collins Jun 17 '20 at 15:41
  • If you send events directly to the window via its handle, it doesn't have to have keyboard focus to receive your simulated keystrokes. That means keyboard input won't go to the off-screen application. You'd have to try it to see if it works for your situation. I agree that mouse events are a more difficult case, but again, try it out and see. – Darryl Jun 17 '20 at 18:58

0 Answers0