473,788 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.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/
Nov 15 '05 #1
0 2097

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

Similar topics

7
5475
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 = oPPT.ActivePresentation oPPT.WindowState = ppWindowMinimized Then I do the copy and paste part: With oPres
0
1493
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 that I found on a webpage to do this (Code I am using is at the bottom of this post). When the application is minimized, the form is hidden and an icon appears in the System Tray. My problem is that when I run another instance, the new instance...
8
11534
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 is set to hidden, so it doesn't have a mainwindowHandle, so I can't send a message to it. Any idea? Thank's in advance,
10
1214
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 : Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As _ System.EventArgs) Handles MyBase.Resize If Me.WindowState = FormWindowState.Minimized Then Me.Visible = False Me.ShowInTaskbar = False End If
0
1383
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 process (since there are 99 processes, I'm trying to keep the screen clutter to a minimum). Basicly, I start the app, then minimize, maximize, show, or hide it based on the option chosen. My problem comes with the actual app I'm monitoring. It...
0
1469
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 process (since there are 99 processes, I'm trying to keep the screen clutter to a minimum). Basicly, I start the app, then minimize, maximize, show, or hide it based on the option chosen. My problem comes with the actual app I'm monitoring. It...
0
1443
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 processes dies, the app restarts it. One of the options I've written hides the main window of the monitored process (since there are 99 processes, I'm trying to keep the screen clutter to a minimum). Basicly, I start the app, then minimize, maximize,...
5
9650
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 eventlog. As this app is really just a wrapper for a class library I don't need it "popping" up on the console and would like it to be either invisible or for the console window to run minimized in the taskbar.
3
3613
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 keystrokes to the programme, and mouse strokes. Can you please tell me how I would do this assuming the programme is called "c:\programme.exe"
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.