小弟拿龍大開源的MS專案想要改成使用爆爆王的專案
以下是龍大偵測程式碼部分:
Private Sub tsiGameLock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsiGameLock.Click
OpenProcessByWindow_LA("MapleStory", "StartUpDlgClass")
End Sub
Private Sub tmDetect_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmDetect.Tick
If FindWindow("MapleStoryClass", "MapleStory") <> 0 Then
MShWnd = FindWindow("MapleStoryClass", "MapleStory")
tmDetect.Enabled = False
End If
End Sub
Public Sub OpenProcessByWindow_LA(ByVal lpWindowName As String, Optional ByVal lpClassName As String = vbNullString)
MShWnd = FindWindow(lpClassName, lpWindowName)
GetWindowThreadProcessId(MShWnd, MSpid)
MShprocess = OpenProcessAPI(&H1F0FFF, False, MSpid)
If MSpid <> 0 Then
CEInitialize(MSpid, MShprocess)
If lpClassName = "StartUpDlgClass" Then
tmDetect.Enabled = True
tmDetect.Enabled = 1000
CloseGame_LA()
End If
Form1.Text = "~偵測成功~" & MSpId
Else
MsgBox("~偵測失敗~")
End If
End Sub