VB编程:用Shell函数打开记事本
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Dim strtemp As String * 60
Private Sub Command1_Click()
Dim L, S
Dim paths As String
L = GetSystemDirectory(strtemp, Len(strtemp))
paths = Left(strtemp, L) & "\NOTEPAD.EXE"
S = Shell(paths, vbNormalFocus)
End Sub