问题出在哪?谢谢!

muxi02 2004-05-06 04:36:47
Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long

Private Sub Command1_Click()
Dim i As Integer
i = WinExec("notepad.exe", "c:\wst.txt", 9)
If i > 32 Then
MsgBox "调用下确!!"
Else
MsgBox "调用错误!!"
End If

End Sub
...全文
44 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yinweihong 2004-05-07
  • 打赏
  • 举报
回复
你是要用Notepad.exe打开c:\wst.txt么?
Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long

Private Sub Command1_Click()
Dim i As Integer
i = WinExec("c:\windows\notepad.exe c:\wst.txt", 1)
If i > 32 Then
MsgBox "调用下确!!"
Else
MsgBox "调用错误!!"
End If

End Sub
xpsp1+vb6sp5通过
muxi02 2004-05-07
  • 打赏
  • 举报
回复
参数?哪里错了?

如果照你这样改的话,它就会一直出现一个"调用出错"的提示,不就永远也不会有可以调用的时候了

如果要调用对的话那应该怎么做的
muxi02 2004-05-07
  • 打赏
  • 举报
回复
怎么显示的还是"调用错误!"

30614141我白天一直在线,期待你的指教!
yinweihong 2004-05-06
  • 打赏
  • 举报
回复
Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long

Private Sub Command1_Click()
Dim i As Integer
i = WinExec("c:\windows\notepad.exe", 9)
If i > 32 Then
MsgBox "调用下确!!"
Else
MsgBox "调用错误!!"
End If

End Sub

楼主看看参数

1,488

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧