473,796 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to prevent the console window popping up.

Ram
I have a console application that brings up a dialog if invoked with no
command line parameters. If I double click on my application a console window
is briefly displayed before the dialog appears (I have this code in my app:

if (args.length ==0) FreeConsole() which causes the console to be closed)

Is there a way to prevent this console window from appearing in the first
place.
Jul 21 '05 #1
2 3083
It's a console app, so of course it going to open a console if you double
click it from windows explorer. Open a DOS Prompt window
(Start->Run->cmd.exe), then run your console app, and no console window
opens.
"Ram" <Ra*@discussion s.microsoft.com > wrote in message
news:78******** *************** ***********@mic rosoft.com...
I have a console application that brings up a dialog if invoked with no
command line parameters. If I double click on my application a console
window
is briefly displayed before the dialog appears (I have this code in my
app:

if (args.length ==0) FreeConsole() which causes the console to be closed)

Is there a way to prevent this console window from appearing in the first
place.

Jul 21 '05 #2
have you tried compiling it as a winexe in the target /t parm of the
compiler options, if it has no interface it wont spawn a console.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Ram" <Ra*@discussion s.microsoft.com > wrote in message
news:78******** *************** ***********@mic rosoft.com...
I have a console application that brings up a dialog if invoked with no
command line parameters. If I double click on my application a console
window
is briefly displayed before the dialog appears (I have this code in my
app:

if (args.length ==0) FreeConsole() which causes the console to be closed)

Is there a way to prevent this console window from appearing in the first
place.

Jul 21 '05 #3

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

Similar topics

10
14739
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to in VB. I've created an ASP interface where a user can select an email group that populates a listbox with those email addresses. If a user sees an email in that list that they do not want then they can remove it by clinking the Delete button...
1
2584
by: James Carnley | last post by:
I am learning how to use windows forms and I have come across a small problem. Whenever I run my program it opens a console window before launching the windows form. The console doesnt go away until the program exits. When you use VS.net to make a windows application it makes a form without a console and I dont know why. What specifies whether a program starts with a console or not? I know that this code is probobly not right but I...
1
1790
by: Matt | last post by:
I have a console application with an UnhandledEvent handler and I believe it would work correctly if I could prevent the JIT Debugger from catching the problem first. How do I stop the JIT Debugger window from popping up? I know windows applications can have a flag set in the config file but I can't find anything like this for a console application. Thanks, Matt
2
260
by: Ram | last post by:
I have a console application that brings up a dialog if invoked with no command line parameters. If I double click on my application a console window is briefly displayed before the dialog appears (I have this code in my app: if (args.length ==0) FreeConsole() which causes the console to be closed) Is there a way to prevent this console window from appearing in the first place.
6
10434
by: Giojo | last post by:
Hello guys! I can't resolve this problem.. I want my programm in c# working with only console if there are some parameters, but if someone make double-click on the exe I want to start the graphic GUI without the black console on background.. Now I check if there are some parameters and if there aren't parameters I run the GUI (with the black console that remain..). If I choose Windows application on Visual Studio, when I run the...
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.
5
18599
by: thinktwice | last post by:
<package> <job id="js"> <script language="JScript"> var WshNetwork = WScript.CreateObject("WScript.Network"); var oDrives = WshNetwork.EnumNetworkDrives(); var oPrinters = WshNetwork.EnumPrinterConnections(); WScript.Echo("Domain = " + WshNetwork.UserDomain); WScript.Echo("Computer Name = " + WshNetwork.ComputerName); WScript.Echo("User Name = " + WshNetwork.UserName); WScript.Echo();
5
3493
by: Scott | last post by:
Hi everyone, I have a c# console app that when run through an autorun.inf file, launches a web page from the CD. It works just fine but I would like the console window minimized on startup. Currently, the console window displays briefly, the web page loads, and the console window disappears. The only line of code currently in the console app is... System.Diagnostics.Process.Start("blahblahblah.htm")
12
6546
by: Dilip | last post by:
Hi All I have a server based C# console application. This application must hide its console window when its launched out on the field. So I dutifully P/Invoke'd FindWindow/ShowWindow combination to hide the console window at launch time. The application (for legacy reasons) hangs around by waiting on an old- fashioned Console.ReadLine() statement.
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9531
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
9055
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...
1
7553
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6795
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();...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
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
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.