tags:

views:

43

answers:

2
+1  Q: 

Show hidden window

I'm creating child console application using Process.Start method. Process is created with WindowStyle set to ProcessWindowStyle.Hidden. But then I need to SendInput to this window and try to show it using ShowWindow method. But ShowWindows has no effect.

A: 

You need to change also the property of process style form hidden to normal.

The methods Show() set the property is equal to setting the property Visible to true (the Hide() sets it to false).

Vash
A: 

From the description of ProcessWindowStyle.Hidden:

The hidden window style. A window can be either visible or hidden. The system displays a hidden window by not drawing it. If a window is hidden, it is effectively disabled. A hidden window can process messages from the system or from other windows, but it cannot process input from the user or display output. Frequently, an application may keep a new window hidden while it customizes the window's appearance, and then make the window style Normal.

So in your case, you will have to set the WindowStyle property of Process.StartInfo to ProcessWindowStyle.Normal.

George Howarth