#代码如下,用来运行同目录的一个demo.pdf文件,然后退出:using System.Diagnostics;Process myProcess = new Process();
myProcess.StartInfo.FileName = "demo.pdf";
myProcess.Start();可是生成的exe文件需要.net framework才能运行,那么用VB6生成的exe文件应该用不着.net framework了吧,如果是这样的话,向各位高手请教以上代码的功能在VB6内如何实现啊!。(其实只要是能够不用.net framework的方式都行)能否稍稍详细一点,因为没怎么用过VB,现在单位要我干没法子才来麻烦各位。拜托啦!!谢谢先~~
再谢!!!
myProcess.StartInfo.FileName = "demo.pdf";
myProcess.Start();可是生成的exe文件需要.net framework才能运行,那么用VB6生成的exe文件应该用不着.net framework了吧,如果是这样的话,向各位高手请教以上代码的功能在VB6内如何实现啊!。(其实只要是能够不用.net framework的方式都行)能否稍稍详细一点,因为没怎么用过VB,现在单位要我干没法子才来麻烦各位。拜托啦!!谢谢先~~
再谢!!!
Private Sub Command1_Click()
Dim strPath As String
strPath = App.Path
If Right(App.Path, 1) <> "\" Then
strPath = strPath + "\"
End If
ShellExecute 0, "open", strPath + "demo.pdf", vbNullString, vbNullString, 3
End Sub
Form1.Visible = False
Dim strPath As String
strPath = App.Path
If Right(App.Path, 1) <> "\" Then
strPath = strPath + "\"
End If
ShellExecute 0, "open", "try.pdf", vbNullString, vbNullString, 3
End
End Sub现在我能做到的只是这样,不过至少可以了,谢谢各位的帮助,尤其是danielinbiti(金),谢谢你!!