Hi,
I don't use CreateNoWindow= True since I would like to see this application on the task manager (as an application) and I should be able to end the task (and its child processes etc). So I used
process.StartIn fo.WindowStyle = ProcessWindowSt yle.Minimized
However my dos window is still maximized. Here is the code snippe
-----------------------
process = new Process()
process.StartIn fo.UseShellExec ute = false
process.StartIn fo.RedirectStan dardOutput = true
process.StartIn fo.RedirectStan dardInput = true
process.StartIn fo.RedirectStan dardError = true
process.StartIn fo.WindowStyle = ProcessWindowSt yle.Minimized
process.StartIn fo.FileName = cmd
process.StartIn fo.Arguments = Arguments
process.StartIn fo.WorkingDirec tory = WorkingDirector y
process.Start()
--------------------
I also used Hidden but it did not work either
UPDATE: Somehow DOS window created is not minimized/hidden. However, I worked around this by calling win32 library functions (SendMessage) with SW_HIDE after starting the process. That worked well. However since the process is not a message loop (not UI) WaitForInputIdl e does not work to wait for to get the window handle. Instead, used Thread.Sleep until the dos window is ready to give hWND other than 0. But this solution seems nasty to me
However, if someone has any other idea, that would be appreciated
Cemal
---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/