请教:如何在VB6中调用外部命令程序?

求VB程序源代码... 求VB程序源代码 展开
 我来答
匿名用户
2013-12-18
展开全部
Declare Function WinExec Lib "Kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As LongDeclare Function WaitForSingleObject Lib "Kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As LongDeclare Function OpenProcess Lib "Kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Global Const INFINITE = -1&Global Const SYNCHRONIZE = &H100000Global iTask As Long, Ret As Long, pHandle As Long Private Sub Command1_Click() Dim Ch As StringCh = "abc.exe" ‘ 应用程序文件名称iTask = Shell(TempCh, 0)pHandle = OpenProcess(SYNCHRONIZE, False, iTask)Ret = WaitForSingleObject(pHandle, INFINITE) End Sub
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式