如何關閉楓之谷啟動視窗(免按Play)
楓之谷啟動視窗怎麼關閉呢?當然是ESC,也就是關閉視窗的意思
所以我們不能幹掉進程,不然遊戲就被關掉了...
這時候就要叫視窗關閉啊~
所以用PostMessage
所以我們不能幹掉進程,不然遊戲就被關掉了...
這時候就要叫視窗關閉啊~
所以用PostMessage
- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
- Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- Private Const WM_CLOSE = &H10
- Private Sub Timer1_Timer()
- Dim hwn As Long
- hwn = FindWindow("StartUpDlgClass", "MapleStory")
- PostMessage hwn, WM_CLOSE, 0, 0
- End Sub
洋蔥
回覆刪除怎辦 我打上去她顯示編譯錯誤 錯再PostMessage
她說 沒有定義SUB 或 FUNCTION