2

I want to create a button that can hide an exe application. As example: this application will start spider.exe when page loads. I need a button that can hide & show the spider.exe. How can I do it with VB.NET, C#, or Java?

I tried to use

myProcess.StartInfo.WindowStyle =  System.Diagnostics.ProcessWindowStyle.Normal
myProcess.Start()

in page load part, and use

myProcess.StartInfo.WindowStyle =  System.Diagnostics.ProcessWindowStyle.Hidden

in button part but it does not work

Chadwick
  • 12,364
  • 7
  • 48
  • 66
e-qi
  • 135
  • 1
  • 3
  • 13

1 Answers1

2

I think you should use PInvoke and call API ShowWindow passing the other app window handle and proper parameters to show or hide.

Laurel
  • 5,771
  • 12
  • 29
  • 54
Davide Piras
  • 43,118
  • 10
  • 90
  • 143