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,555
  • 7
  • 49
  • 66
e-qi
  • 135
  • 2
  • 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,965
  • 14
  • 31
  • 57
Davide Piras
  • 43,984
  • 10
  • 98
  • 147