Click here to Skip to main content
15,908,254 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When i use process.start() there is a flash on the screen of the command prompt.

How can I hide it?
Posted
Updated 30-Aug-10 8:35am
v2
Comments
Dalek Dave 30-Aug-10 14:35pm    

Can you try this:
VB
Dim PSI As New ProcessStartInfo("C:\somefiletoexecute.exe", "some argument to pass")

PSI.CreateNoWindow = True
PSI.WindowStyle = ProcessWindowStyle.Hidden

Process.Start(PSI)


Have a look at this: ProcessStartInfo Class[^]...
 
Share this answer
 
Comments
AspDotNetDev 30-Aug-10 14:28pm    
Reason for my vote of 4
Looks correct to me, but is in VB.Net rather than C# (the languaged tagged by the OP).
danilmanuel 30-Aug-10 14:36pm    
yes its working...thanks a lot
Toli Cuturicu 30-Aug-10 15:17pm    
Reason for my vote of 3
Why do you think the OP understands VB?
Well it depends on if the application your starting is a console one or not, surely?
 
Share this answer
 
Comments
Toli Cuturicu 30-Aug-10 15:17pm    
Reason for my vote of 4
Yes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900