如题

解决方案 »

  1.   

    dim i
    i = Shell("C:\WINDOWS\system32\sndrec32.exe", 1)
    搞定!
      

  2.   


    在你的程序里调用录音机Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Form_Load()ShellExecute Me.hwnd, "open", "C:\WINDOWS\system32\sndrec32.exe", vbNullString, vbNullString, SW_SHOWEnd Sub
      

  3.   


    取得Windows所在目录 
    Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    Private Sub Form_Load()    Dim sSave As String, Ret As Long
        'Create a buffer
        sSave = Space(255)
        'Get the system directory
        Ret = GetSystemDirectory(sSave, 255)
        'Remove all unnecessary chr$(0)'s
        sSave = Left$(sSave, Ret)
        'Show the windows directory
        MsgBox "Windows System directory: " + sSave
    End Sub