用VB写的一个程序IE6下可以显示,1E8不显示浏览网址
用VB写的一个程序IE6下可以显示,1E8不显示浏览网址。请教高手们如何解决这个问题,万分感谢!!!Dim point1 As Integer, point2 As Integer
hwnd0 = FindWindowEx(0, 0, "IEFrame", vbNullString) '找到IE窗口句柄
If hwnd0 = 0 Then Exit Sub
hwnd1 = FindWindowEx(hwnd0, 0, "WorkerW", vbNullString) 'IE窗口的工作区句柄
hwnd1 = FindWindowEx(hwnd1, 0, "ReBarWindow32", vbNullString) 'IE窗口的菜单栏句柄
If hwnd1 = 0 Then Exit Sub
hwnd1 = FindWindowEx(hwnd1, 0, "ComboBoxEx32", vbNullString) 'IE窗口下拉菜单句柄
If hwnd1 = 0 Then Exit Sub
hwnd1 = FindWindowEx(hwnd1, 0, "ComboBox", vbNullString) 'IE窗口下拉菜单当前项句柄
If hwnd1 = 0 Then Exit Sub
hwnd1 = FindWindowEx(hwnd1, 0, "Edit", vbNullString) '逐层分析找到地址栏编辑框句柄
If hwnd1 = 0 Then Exit Sub
LengthURL = SendMessage(hwnd1, WM_GETTEXTLENGTH, 0, ByVal 0)
StrIEURL = Space(LengthURL + 1)
SendMessage hwnd1, WM_GETTEXT, LengthURL + 1, ByVal StrIEURL
point1 = InStr(StrIEURL, "//")
point2 = InStr(point1 + 2, StrIEURL, "/") '判断是否包含文件夹路径
If point2 <> 0 Then
StrIEURL = Left(StrIEURL, point2 - 1) '取得网站域名
End If
If Asc(Left(StrIEURL, 1)) <> 0 Then
If ChkBlackList.Value = 1 Then
For i = 0 To LstBlackList.ListCount
If LstBlackList.List(i) = StrIEURL Then
PostMessage hwnd0, WM_CLOSE, 0, 0 '关闭禁止的窗口
Exit Sub
End If
Next i
End If
For i = 0 To LstURL.ListCount - 1
If StrIEURL = LstURL.List(i) Then Exit Sub '不添加重复网址
Next i
LstURL.AddItem (StrIEURL) '成功能检测出网址后,将其添加到列表 '首字符的ASCII码不为0
End If 没有人知道吗
补充:VB , 网络编程