Home > Net >  How to put the exe program background!!!!!!!!!!!!!!
How to put the exe program background!!!!!!!!!!!!!!

Time:10-08

A non.net exe program written, how to implement the exe program run in c #, do not display box, how to achieve!!!!!!

CodePudding user response:

Is to make the exe runs in the background, not see his interface in the task bar

CodePudding user response:

ProcessInfo object,

CodePudding user response:

Started with the Process, then use the win32 interface set some parameters, make it become invisible;

CodePudding user response:

The Process class let it run
Set to Hidden, NoWindow

CodePudding user response:

All want to so much, as a service is not good, service is set to start automatically boot inside

CodePudding user response:

The
reference 2 floor XBodhi. Response:
ProcessInfo object,

I found some code online, if not, is there any sample code, thank you,

CodePudding user response:

reference 4 floor stherix response:
Process class let it run
Were set to Hidden, NoWindow

Is there any sample code, I tried pretty much all not line, 555555

CodePudding user response:

reference 4 floor stherix response:
Process class let it run
Were set to Hidden, NoWindow


This can be

CodePudding user response:

 using System. Diagnostics; 

The Process pro=new Process ();
Pro. StartInfo. FileName="";//process the full path name
Pro. StartInfo. The Arguments="";//command line parameter
Pro. StartInfo. UseShellExecute=true;
Pro. StartInfo. WindowStyle=ProcessWindowStyle. Hidden;//hide visual form
Pro. Start ();

CodePudding user response:

references 9 f wu127877 response:
 using System. The Diagnostics; 

The Process pro=new Process ();
Pro. StartInfo. FileName="";//process the full path name
Pro. StartInfo. The Arguments="";//command line parameter
Pro. StartInfo. UseShellExecute=true;
Pro. StartInfo. WindowStyle=ProcessWindowStyle. Hidden;//hide visual form
Pro. Start ();


The main program is turned off, the exe display form, how to do

CodePudding user response:

references to the tenth floor viva369 response:
Quote: references 9 f wu127877 response:

 using System. Diagnostics; 

The Process pro=new Process ();
Pro. StartInfo. FileName="";//process the full path name
Pro. StartInfo. The Arguments="";//command line parameter
Pro. StartInfo. UseShellExecute=true;
Pro. StartInfo. WindowStyle=ProcessWindowStyle. Hidden;//hide visual form
Pro. Start ();


The main program is turned off, the exe displays the form, how to do


The
 pro. StartInfo. UseShellExecute=true; 
Pro. StartInfo. WindowStyle=ProcessWindowStyle. Hidden;//hide visual form

Change
 pro. StartInfo. UseShellExecute=false; 
Pro. StartInfo. CreateNoWindow=true;

Like this?

https://stackoverflow.com/questions/5094003/net-windowstyle-hidden-vs-createnowindow-true

CodePudding user response:

Just find a handle to the background,,,,,,,

CodePudding user response:

 System. Diagnostics. Process. The Start (filePath); 
  •  Tags:  
  • C#
  • Related