大家好! 请问VB中,怎么样能够直接调用一个文本文件,而且能够以记事本的格式显示。谢谢!

解决方案 »

  1.   

    就是用记事本打开一个文本?
    直接调用API函数
      

  2.   

    shell "notepad " & "C:\ur_txt_file.txt"
      

  3.   

    打开c:\abc.txt文件
    Private Sub Command1_Click()
    x = Shell("c:\pwin98\notepad.exe c:\abc.txt", vbNormalFocus)
    End Sub
      

  4.   

    shell "Notepad.exe Filepath\FileName"
      

  5.   

    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 Long
    用这个API最安全.