大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> 程序开发 -> 打开和关闭其他应用

打开和关闭其他应用

时间: 2021-07-31 作者:daque

declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long declare function sendmessage lib "user32" alias "sendmessagea" (byval hwnd as long, byval wmsg as long, byval wparam as long, lparam as long) as long 翻开运用: private sub command1_click() shell "calc.exe", vbnormalfocus end sub 封闭运用: private sub command2_click() dim lpclassname as string dim lpcaption as string dim handle as long const nill = 0& const wm_syscommand = &h112 const sc_close = &hf060& lpclassname = "scicalc" lpcaption = "calculator" 解释:* determine the handle to the calculator window. handle = findwindow(lpclassname$, lpcaption$) 解释:* post a message to calc to end its existence. handle = sendmessage(handle, wm_syscommand, sc_close, nill) end sub

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.