Execute the EXE file before the program starts.

Source: Internet
Author: User

In the program. CS file, start the applicationProgramBefore,

Use

If (system. Io. file. exists ("qq.exe "))
{
System. Diagnostics. process. Start ("qq.exe ");
}

You can execute the actual EXE file before starting, such as the upgrade function.

 

 

You can also make the help document into a web page (the web page is displayed after the Help menu is selected)

  Private   Void Button2_click ( Object Sender, system. eventargs E)
{
String Strfilepath = Application. startuppath + @" \ Htmlpage1.htm " ;
MessageBox. Show (strfilepath );
System. Diagnostics. process. Start (strfilepath );
}

 

There are also two simple applications

System. Diagnostics. process. Start ( " Shutdown " , @" /L " ); // ------------ Log out of the computer
System. Diagnostics. process. Start ( " Shutdown " , @" /R " ); // ------------ Restart the computer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.