[求助]如何启动另一个程序……?(waiting)

Seiya_ 2003-08-26 06:09:51
点CMD启动同目录下的FORM2.EXE,怎么做?
别笑话我,真不会……
...全文
37 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
米克贝瑞 2003-08-26
  • 打赏
  • 举报
回复
shell 呀
wumy_ld 2003-08-26
  • 打赏
  • 举报
回复
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 Const SW_SHOW = 5


private sub command1_click()
dim strPath as string
if right(app.path,1)<>"\" then
strPath=app.path & "\"
else
strPath=app.path
end if
strpath=strpath & "form2.exe"
ShellExecute Me.hwnd, "open", strpath, vbNullString, vbNullString, SW_SHOW
end sub
132105 2003-08-26
  • 打赏
  • 举报
回复
你看都用
shell,你也用好啦。就用shell 文件名
hxy2003 2003-08-26
  • 打赏
  • 举报
回复
shell "path\filename"
taosihai1only 2003-08-26
  • 打赏
  • 举报
回复
shell "c;\sfj\1.exe"
planetike 2003-08-26
  • 打赏
  • 举报
回复
shell "文件名"
iiboy 2003-08-26
  • 打赏
  • 举报
回复
不知道你说的同目录是什么,不过如果是和
shell "form2.exe"

7,789

社区成员

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

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