当前位置:编程学习 > VB >>

怎么样在VB中调用文本文件呢?

我用过shell"notepad.exe 文本文件名称",vbnormalfocus
可是当我把文本文件名称换成所在路径时,就不好用了!这事怎么回事呢? --------------------编程问答-------------------- '添加 Command1 并在你的程序相同路径下摆个 test.txt

Dim appdisk$
Private Sub Form_Load()
   appdisk = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\")
End Sub

Private Sub Command1_Click()
   If Dir(appdisk & "test.txt") <> "" Then Shell "Notepad " & appdisk & "test.txt", vbMaximizedFocus
End Sub

补充:VB ,  基础类
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,