473,405 Members | 2,262 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,405 software developers and data experts.

How to hide a console window?

I would like to hide a console window on startup so that the user can't
close it. is this possible? If so, how would I also show it when I
want to view it?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
1 3071
Hi Terry,

Is there another application launching your console application? If not, you
could create a simple program:

Start a new Windows application
Set ShowInTaskbar = False
Opacity = 0%

Double-click form load & do something like this:

Dim strConsole As String = IO.Path.Combine(Application.StartupPath,
"MyApp.exe")

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim psi As New System.Diagnostics.ProcessStartInfo(strConsole)
psi.WindowStyle = ProcessWindowStyle.Hidden

Dim p As New System.Diagnostics.Process
p.Start(psi)

Application.Exit()

End Sub

I have called 'MyApp.exe' the console project, so you will need to rename it

You will also need to copy your console app to the exe directory of your
built Windows application executable

When you run the Windows app it starts the console application & then
closes.

I hope this gives you an idea of how you could approach this

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2

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

Similar topics

6
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false...
2
by: Jason Han | last post by:
I have a .NET Windows application which launches another .NET console application using Start() method in the Process class. I set the StartInfo.CreateNoWindow to true. But on Windows98, the...
3
by: dricks dr | last post by:
Hi, I'm using the AxWebBrowser Control from microsoft in a C# application. It works fine, but i have many problems to hide the javascript error windows that appear when u visit a website with......
9
by: DaveF | last post by:
Can you hide a vb.net console window?
0
by: Helge Lenuweit | last post by:
Hello, I am trying to put together an application that (1) shows Console.WriteLine() output when launched from within a console window (that is, from the command prompt) but that (2) **does not...
2
by: xfadeuk | last post by:
I have a requirement to create a simple window switching program, which switches between 2 windows when the specified hotkey is pressed. I have managed to accomplish this fairly easilly although I...
1
by: JupeMarsInc | last post by:
Hi, I'm using a simple console application project in VC++ (not a window one). my question is, how can I hide the console window,prevent it from popping up when i run my program? Thank you
2
luke14free
by: luke14free | last post by:
Hello guys, I've been searching for a method to hide the console (as c/c++ user would say) under windows, but i found nothing really helpful. What I found is: 1) I need to rename file as pyw. But...
1
by: Kevin McKinley | last post by:
When I use py2exe to convert Python script to executable Windows programs I always have a black console pop up behind my program. If i run the script before i convert it with py2exe it don't have...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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.