473,659 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3097
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.St artupPath,
"MyApp.exe" )

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Dim psi As New System.Diagnost ics.ProcessStar tInfo(strConsol e)
psi.WindowStyle = ProcessWindowSt yle.Hidden

Dim p As New System.Diagnost ics.Process
p.Start(psi)

Application.Exi t()

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
11472
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 window.scrollbars.visibility="no" .... nothing works Is it also possible only to hide the vertical scrollbar instead of both?
2
404
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 console still shows up (on XP and 2000, no window shows up). Could anyone tell me how to hide the console window? Thanks in advance for the help.
3
10405
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... javascript errors :) I can catch errors coming from website that does not use frames using : private void NavigateComplete(object sender,AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e) {
9
19429
by: DaveF | last post by:
Can you hide a vb.net console window?
0
1373
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 open** a console window when launched from Explorer or another process. Can this be done? I haven't had any luck so far - either all Console output is redirected to null (target:winexe) or a console window is
2
6023
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 want to hide the console window that is shown when my application is run. Here is my code: #include <windows.h> #include <winuser.h>
1
6922
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
11440
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 when I do so, code just doesn't give any output or open windows, it just close itself... 2) I need to create a "python" service...But how? Is there another simpler method to tell python that my main window is the frame and not the console? I'm...
1
2901
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 the console because i save the script ending with .pyw instead of .py. Is there a way to get rid or hide this console once i've turned it into a executable windows program? Thanks you Kevin McKinley
0
8330
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
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8523
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
7355
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
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
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
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.