Hide console Window

Errods

Well-known member
Joined
Dec 17, 2007
Messages
71
Location
Kundapur, Karnataka, Udupi, India.
Programming Experience
1-3
Hi Guys,

I have a thread running a thread in the background.......

Sub Main is the Entry point to the application where the Thread is Intialized and also run Infinitely but the console window is displayed util the thread is Stoped........:confused:

Is there any way the display of the Console Window Avoided...........

An Example with Code would be a Great Help

Thanks In Advance Guys..............
:)
 
well yes... change the program type. If the purpose of the program is to run without intervention, then you should set it up as a service. If you need a gui, then a winforms application and if you need a command line interface, then a console application. If you have a main entry point which is spawning off its own thread then it should be easy enough to create a new project as a service and copy the code. You'll need to write some code to facilitate the Start/Stop/Pause commands etc but that's pretty straight forward
 
Maybe the following two ways can resolve you problem:
1. use Shell command
Example: Shell(PathName, AppWinStyle.Hide,False )
2. use StartProcessInfo
Example:


Imports System.Diagnostics

....
Dim a As New ProcessStartInfo(fileName)
a.CreateNoWindow = True
Process.Start(a)
 
Back
Top