473,473 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

console window closing upon opening

hi,

i have a working console app. however, it closes as soon as it opens.

i know that it works because i can just about read it. how do i stop it from
closing straight after opening?
--
Alvo von Cossel I of Germany
Nov 17 '05 #1
3 1337
"Alvo von Cossel I" <Al************@discussions.microsoft.com> wrote in
message news:34**********************************@microsof t.com...
i have a working console app. however, it closes as soon as it opens.


Open up a command prompt window, navigate to the directory in which your
program resides and type its name.

Alternatively, choose 'Start without Debugging' from the Debug menu in the
IDE.

Regards,
Will
Nov 17 '05 #2

"Alvo von Cossel I" <Al************@discussions.microsoft.com> schrieb im
Newsbeitrag news:34**********************************@microsof t.com...
hi,

i have a working console app. however, it closes as soon as it opens.

i know that it works because i can just about read it. how do i stop it
from
closing straight after opening?
--
Alvo von Cossel I of Germany


Try

"Console.ReadLine ( ) ;"

to make the console window stay opened until a key is being pressed.
Best Regards, Sebastian
Nov 17 '05 #3
Use getch() if this is a native C++ app.

Use Console::ReadKey(true) if this is a C++/CLI app.

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com
"Alvo von Cossel I" <Al************@discussions.microsoft.com> wrote in
message news:34**********************************@microsof t.com...
hi,

i have a working console app. however, it closes as soon as it opens.

i know that it works because i can just about read it. how do i stop it
from
closing straight after opening?
--
Alvo von Cossel I of Germany

Nov 17 '05 #4

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

Similar topics

2
by: Fred Snider | last post by:
Help! Opening a new window using the window.open( ) command works great for opening new windows and having them on top and having the focus. The window.focus command brings any existing...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
7
by: Miktor | last post by:
At the minute I am using the following rather unwieldy function to prevent the console window in Dev C++ from closing before I can see the output from my program: // function to prevent the...
4
by: bbass | last post by:
thanks to all that replyied to my previous post with the following code in question: <a href="merc.htm" target="_new_merc" onfocusout=window.close class="left_link"> i understand that the...
17
by: MumboJumbo | last post by:
Hi I have a really basic question hopefully some can help me with: Can you write a (i.e. one) C# project that works from the cmd line and gui? I seems if i write a GUI app it can't write to...
3
by: Srik | last post by:
I am working on a project where in we have a requirement in which we need to open a new window on click of a link and also I should display a link in the new opened window after the data is...
2
by: Jacques Daniels | last post by:
I am using System.Console.WriteLine(" ") to output the results of a function to the console window. Before I can see the results of my function, the window is closing. How can I prevent this? ...
6
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...
12
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...
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
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...
1
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...
0
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.