Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use shell command in VB language

Shulou Source: shulou.com Published: 2022-06-01 03:00:29 09月25日 Update

This article mainly introduces how to use shell command in VB language, which is very detailed and has certain reference value. Friends who are interested must finish reading it.

The interface is as follows:

Review some important symbols in common use

Common symbols in VB programming:

When using this symbol, pay attention to adding a space before and after it, which is often used for the connection between strings.

This symbol is composed of less than sign and greater than sign, which indicates that it is not equal to and is often used in logical judgment.

The = symbol has two meanings and can be used in different situations, one is assignment, the other is logical judgment.

"" double quotation marks represent a string, which is used for a string type, and represents a string of text.

Single quotation marks denote comments and are often used to indicate the meaning of program code.

. The dot symbol, which stands for "of", is often used to get or set a property after a control object.

() parentheses indicate the priority of execution.

A symbol used primarily for mathematical operations.

The semicolon indicates the connection string, which, when concatenated, can merge multiple lines of print output

Second, combine important shell commands

How to use the command function in VB?

Use the shell keyword command directly.

How to open a Baidu web page through a link?

Shell "explorer http://www.baidu.com"

We can also open files or folders on our local computer through explorer.

You can also open a command prompt through cmd.

III. For cycle

Use format:

For custom initialization variable to termination condition step size of the step variable

Here is the code to be executed under the condition of the loop

The variable customized by next

Practical application:

For example, open a file in batches?

For I = 1 To 5 Step 2

Shell "explorer D:\ aaa.txt"

Next i

Understand the mysteries of the loop according to the above code.

The above is all the contents of the article "how to use shell commands in VB language". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Symbols commands characters strings codes variables files loops languages importance content can be passed commonly used quotation marks meaning conditions articles logic different two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple MariaDB OPPO Reno vpn