怎么实现对windows中的计算器和记事本的调用!最后有源代码!谢谢先!

解决方案 »

  1.   

    分不同的系统,直接用shell函数调用不就行了,一般分9x和nt系列不就够了,也不麻烦
      

  2.   

    Private Declare Function GetSystemDirectoryA Lib "kernel32" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
      
      
        Private Sub Command1_Click()
            Dim Path As String * 255
            Dim strLen As Long
            
            strLen = GetSystemDirectoryA(Path, Len(Path)) '获取SYSTEM路径        Shell Left(Path, strLen) + "\notepad.exe", vbNormalFocus   '记事本
            Shell Left(Path, strLen) + "\calc.exe", vbNormalFocus      '计算器
        End Sub