VB获取IE7地址栏URL

VB获取IE7地址栏URL,第1张

概述参考:答疑网 http://www.dayi.net Option ExplicitPrivate Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As St 参考:答疑网 http://www.dayi.net
Option ExplicitPrivate Declare Function findwindowex lib "user32" Alias "findwindowexA" (ByVal hWnd1 As Long,ByVal hWnd2 As Long,ByVal lpsz1 As String,ByVal lpsz2 As String) As LongPrivate Declare Function SendMessage lib "user32" Alias "SendMessageA" (ByVal hwnd As Long,ByVal wMsg As Long,ByVal wParam As Long,lParam As Long) As LongPrivate Declare Function SendMessageByString lib "user32" Alias "SendMessageA" (ByVal hwnd As Long,ByVal lParam As String) As LongPrivate Const WM_GETTEXTLENGTH = &HEPrivate Const WM_GETTEXT = &HDPrivate Sub Command1_Click()Dim hwnd As LongDim retLength As Long,retString As Stringhwnd = findwindowex(0,"IEFrame",vbNullString)hwnd = findwindowex(hwnd,"WorkerW","RebarWindow32","Address Band Root","ComboBoxEx32","ComboBox","Edit",vbNullString)retLength = SendMessage(hwnd,WM_GETTEXTLENGTH,0)retString = String(retLength,0)SendMessageByString hwnd,WM_GETTEXT,retLength + 1,retStringMsgBox retStringEnd Sub
总结

以上是内存溢出为你收集整理的VB获取IE7地址栏URL全部内容,希望文章能够帮你解决VB获取IE7地址栏URL所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1283860.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存