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所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)