Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
mark 外挂基础
全局代码
<DllImport("user32.dll", EntryPoint := "FindWindow", SetLastError := True)> _
Public Function FindWindow(lpClassName As String, lpWindowName As String) As IntPtr
End Function
<DllImport("user32.dll", EntryPoint := "FindWindowEx", SetLastError := True)> _
Public Function FindWindowEx(hwndParent As IntPtr, hwndChildAfter As UInteger, lpszClass As String, lpszWindow As String) As IntPtr
End Function
<DllImport("user32.dll", EntryPoint := "SendMessage", SetLastError := True, CharSet := CharSet.Auto)> _
Public Function SendMessage(hwnd As IntPtr, wMsg As UInteger, wParam As IntPtr, lParam As String) As Integer
End Function
调用代码
Dim hwnd As IntPtr = FindWindow("WindowsForms10.Window.8.app.0.378734a", "提示")
If hwnd <> IntPtr.Zero Then
msgbox("即将修改窗口标题")
SendMessage(hwnd, &H000C, 0, "修改窗口的标题")
Dim hwndSure As IntPtr = FindWindowEx(hwnd, 0, "WindowsForms10.STATIC.app.0.378734a", "OpenQQ失去连接!")
If hwndSure <> IntPtr.Zero Then
msgbox("找到label:" & cstr(hwndSure))
'SendMessage(hwndSure, &H000C, 0, "我就修改你怎么啦!")
End If
End If
调用代码我要放在什么位置呢
做一个计划任务,如果检测有此窗口弹出,就自己在右下角弹出一个窗口
Dim hwnd As IntPtr = FindWindow("WindowsForms10.Window.8.app.0.378734a", "提示")
If hwnd <> IntPtr.Zero Then
forms("窗口1").Open
Else
forms("窗口1").Close
End If
呃,目前不行,要不你代码这样写。
Dim hwnd As IntPtr = FindWindow("WindowsForms10.Window.8.app.0.378734a", "提示")
If hwnd <> IntPtr.Zero Then
SendMessage(hwnd, &H18, 0, "")
forms("窗口1").Open
Else
forms("窗口1").Close
End If
http://www.cnblogs.com/lellansin/archive/2012/05/14/2498739.html
这样的话效果是达到了,但是如果提示框没有办法关闭的话 弹窗会一直提示。无法关闭