vb.net shell, IO. File.Open, Process.Start, ShellExecute API Application Experience Summary

Source: Internet
Author: User

There are many ways to open the file, but I learned that the use of more is the above--, in order to prevent forgetting later, the first to write down the understanding.

1. Shell

This read a lot of web pages, the most reliable way to use:

Shell ("" " ) to open a file by invoking the cmd command with the shell

But the problem is that the command window won't shut down--open it together and need to continue digging.

2, IO. File.Open

This operation is not a problem, but does not appear, the second execution will be error: The process is already running.

Do not understand, first remember.

3, Process.Start (this I like)

This is easy to understand, vb.net, direct use, and a variety of overloads, remember right: "Go To Definition"

4. ShellExecute API

This is the API, the key is to introduce the API, but also a good thing.

vb.net shell, IO. File.Open, Process.Start, ShellExecute API Application Experience Summary

Related Article

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.