国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

VB 從零開始編外掛(一)

2024-07-21 02:20:41
字體:
來源:轉載
供稿:網友
需要vb api函數:
findwindow ←尋找窗口列表中第一個符合指定條件的頂級窗口
getwindowthreadprocessid ←獲取與指定窗口關聯在一起的一個進程和線程標識符
--------------------------------------------------------------------------------------------------------------------------------------------------------
相關api聲明:
findwindow

private declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long

getwindowthreadprocessid

private declare function getwindowthreadprocessid lib "user32" (byval hwnd as long, lpdwprocessid as long)
as long
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要的控件:label、timer
-------------------------------------------------------------------------------------------------------------------------------------------------------- 自定義函數:
dim hwnd as long
-------------------------------------------------------------------------------------------------------------------------------------------------------- 源代碼:
private declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long
private declare function getwindowthreadprocessid lib "user32" (byval hwnd as long, lpdwprocessid as long)as long
private sub timer1_timer()
dim hwnd as long' 儲存 findwindow 函數返回的句柄
hwnd = findwindow(vbnullstring, "windows media player")' 取得進程標識符
'只要把windows media player換成游戲的名稱就可了!
if hwnd = 0 then
label1.caption = "游戲未運行"
else
label1.caption = "游戲已運行"
end if
end sub


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 丰台区| 资溪县| 内丘县| 长白| 天门市| 海丰县| 临桂县| 青海省| 厦门市| 淅川县| 芦溪县| 扶风县| 法库县| 阿巴嘎旗| 灵台县| 南昌县| 固原市| 七台河市| 宁阳县| 武隆县| 九江市| 普洱| 旬阳县| 革吉县| 白水县| 新丰县| 诏安县| 呼和浩特市| 黄骅市| 湛江市| 金昌市| 原平市| 安陆市| 崇礼县| 嘉祥县| 青州市| 太保市| 定边县| 平果县| 抚宁县| 淳化县|