Home>
[stathread] static void main () {
 bool isapprunning=false;
 system.threading.mutex mutex=new system.threading.mutex (true, system.diagnostics.process.getcurrentprocess (). processname, out isapprunning);
 if (! isapprunning) {
  messagebox.show ("This program is already running,Please do not run repeatedly! ");
  environment.exit (1);
 }
 else
 {
  application.enablevisualstyles ();
  application.setcompatibletextrenderingdefault (false);
  application.run (new form1 ());
 }
}
c
  • Previous Analysis of ImageView usage examples for Android controls
  • Next Understanding pointer variables in C ++