473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why DOS Window can not be minimized/hidden

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.StartInfo.WindowStyle = ProcessWindowStyle.Minimized

However my dos window is still maximized. Here is the code snippe
-----------------------
process = new Process()
process.StartInfo.UseShellExecute = false
process.StartInfo.RedirectStandardOutput = true
process.StartInfo.RedirectStandardInput = true
process.StartInfo.RedirectStandardError = true
process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized
process.StartInfo.FileName = cmd
process.StartInfo.Arguments = Arguments
process.StartInfo.WorkingDirectory = WorkingDirectory
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) WaitForInputIdle 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/
Nov 15 '05 #1
0 2063

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Colleyville Alan | last post by:
I have an app that uses Access to grab various PowerPoint slides using the followhyperlink command. I have set the PPT window to run in a minimized state: FollowHyperlink link Set oPres =...
0
by: Joe Harrison | last post by:
Hello. I have an application which I check to see if there is another running instance at startup. If there is another running instance, I set focus to the existing instance. I am using code...
8
by: Mészáros Tamás | last post by:
Hi all, how can I set an app's main window to visible from an other application? My problem is, that I know only the handle of the other app's main process, because the application's main window...
10
by: Mitchell Vincent | last post by:
I have a tiny little application that runs, and when minimized it throws itself into the systray until the user double clicks on the systray icon. To accomplish that first part I have this : ...
0
by: bamapookie | last post by:
I've written an app that starts and monitors a number of processes. If one of those processes dies, the app restarts it. One of the options I've written hides the main window of the monitored...
0
by: bamapookie | last post by:
I've written an app that starts and monitors a number of processes. If one of those processes dies, the app restarts it. One of the options I've written hides the main window of the monitored...
0
by: bamapookie | last post by:
I'm sorry if this was posted several times. I did not see my previous post appear after I posted it. I've written an app that starts and monitors a number of processes. If one of those...
5
by: Paul | last post by:
Hi, I have a console app which is simply called from another app which passes a filename to it for processing. It does not display anything or require any input. All errors are sent to the...
3
by: garyusenet | last post by:
I have a programme written in C++, the programme is unmanaged and is an executable, i don't have any source code. I'm writing a C# program. I want to (a) start the programme minimized. (b) send...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.