VB如何打开“运行”,如何打开“系统配置实用程序”
来源:百度知道 编辑:UC知道 时间:2024/06/30 04:54:56
谢谢啦~~~~
运行===-输入 msconfig 回车
Declare Function SHRunDialog Lib "Shell32" Alias "#61" (ByVal hOwner As Long, ByVal hIcon As Long, ByVal sDir As Long, ByVal szTitle As String, ByVal szPrompt As String, ByVal uFlags As Long) As Long
Sub ShowRunDialog(ByRef CallingForm As Form, Optional Title As String, Optional Description As String)
If Title = "" Then Title = "Run"
If Description = "" Then Description = "Type the name of a program to open, " & "then click OK when finished."
SHRunDialog CallingForm.hWnd, 0, 0, Title, Description, 0
End Sub
Private Sub Command1_Click()
ShowRunDialog Me, "Run Dialog", "Choose a program and press OK"
End Sub
Private Sub Command2_Click()
Shell "msconfig.exe", 1
End Sub
Option Explicit
Private Declare Function SHRunDialog Lib "shell32" Alias &quo