大神进来,非常感谢!
Dim WithEvents IEWin As cIEWindowsPrivate Sub IEWin_IEDocumentComplete(hwnd As Long, ByVal pDisp As Object, URL As Variant)
On Error Resume Next
If InStr(URL, "http://www.baidu.com/") > 0 Then
IEWin.IE(CStr(hwnd)).IEctl.navigate "http://www.
Exit Sub
End If
End Sub
Private Sub IEWin_IENavigationBegin(hwnd As Long, ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
On Error Resume Next
If InStr(URL, "http://www.baidu.com/") > 0 Then
IEWin.IE(CStr(hwnd)).IEctl.navigate "http://www.
Exit Sub
End If
End Sub
Private Sub Form_Load()
Form1.Width = 0
Form1.Height = 0
Set IEWin = New cIEWindows
End Sub
Private Sub IEWin_IEMouseDown(hwnd As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
MsgBox Button & "-" & X & "-" & Y
End Sub
Private Sub IEWin_IENavigationComplete(hwnd As Long, ByVal pDisp As Object, URL As Variant)
On Error Resume Next
If InStr(URL, "http://www.baidu.com/") > 0 Then
IEWin.IE(CStr(hwnd)).IEctl.navigate "http://www.
Exit Sub
End If
End Sub
这个需要怎么才可以把他改成用txt格式读取地址呢,以前有个朋友帮我搞过,但是我的源码丢了。
TXT里面的格式是这样的比如:www.baidu.com$www.g.cn