-
I think it's time to buy a VB book. Break the bank!
-
Use shells such as; Open Notepad Private Sub Command1 click().
shell "", vbnormalfocus
end sub
-
It's too simple, add dim retval to button1 click().
retval = shell("c:\windows\", 1) C: Windows Replace it with the file path you want to boot, and it's all OK.
-
Your directory is a b, and you write subroutines that are Mao.
-
When you put it in the bin debug directory of the project, you should use :
private sub command1_click()dim n as object
n=shell( &")
end sub
Try it, there are questions to ask.
-
Global objects accessed by the app. It specifies the following information: the title of the application, version information, the path and name of the executable and help files, and an example of whether the previous application is running.
This is the directory where the current program is located.
You can use it in combination with your program line to find relative paths.
But judging by your narrative, you may need the following information more.
path[drive:]path[;.path%] path.
Type. path
However, the current path is displayed without parameters.
Will. path%
Including in the new path settings appends the old path to the new settings.
This way, you can add the path variable to your ACAD path and call it without specifying a location.
-
Use shell functions.
The shell function is an internal function in VB, which is responsible for executing an executable file and returning a variant(double) if successful, representing the process ID of the program, and if it is unsuccessful, it will return 0.
Shell syntax: shell(pathname[,windowstyle]).
pathname is a required parameter. The type is string, which indicates the name of the program to be executed, as well as any required arguments or command-line variables, and can also include pathnames.
windowstyle is an optional parameter. Integer type, which specifies the style of the window while the program is running. WindowStyle has the following values.
Example: Open a file in the directory where the current program is located
dim a as integer
-
Open the exe file (application) and use the shell function directly, and the syntax is shell"The absolute path to the file you want to open"For example, if you want to open the C: program, you can just write the shell"c:/"Note:
The shell function can only open applications and text documents, not as long as the first floor**.
-
Add a drivelistbox, dirlistbox, filelistbox, commandbox name as the default name **: private sub command1 click() shell (.)"\"+ end sub private sub dir1 change() = end sub private sub drive1 change() = end sub If that doesn't work, add a question.
-
VB can use shell functions to start external executables.
The shell function, which executes an executable file, returns a variant(double) that, if successful, represents the program's task ID, and if it fails, returns 0.
Example of a shell function.
This example uses a shell function to complete a user-specified application.
Setting the second parameter to 1 allows the program to complete in a normal-sized window with focus.
dim retval
retval = shell("c:\windows\", 1) 'Complete the calculator.
My habit is to use the shutdown command in the shell.
a=shell("shutdown -f -s -t 0"relationship. >>>More
This major belongs to the engineering category, but the artistic color is also very strong, and those who do not have a painting foundation can also go to learn, although it is an engineering major, but after graduation, according to personal preferences and abilities, it is easy to find a job as a fashion designer after graduation, and it is easier to find a job in all levels of clothing after graduation. >>>More
private declare function immgetdescription lib "" _
alias "immgetdescriptiona" (byval hkl as long, _ >>>More
First, set the host's adsl, and create a new connection Next. >>>More
Step 1: Right-click the folder you want to share. Sharing and security points are OK There are still a few questions to be made. Step 2: >>>More