分类：电脑/网络-程序设计
问题：VB中如何让单击窗口时，弹出以建立的写字板文件或DOC文件 
回答：在代码最上面加API函数宣言
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

添加代码
Private Sub Form_Click()
ShellExecute Me.hwnd, "open", "c:\test.doc", vbNullString, vbNullString, 1
End Sub

把"c:\test.doc"改成你想打开的文件的路径就行了。