原创 VB调用webbrowser技巧集1收藏

1、获得浏览器信息:

Private Sub Command1_Click()
    WebBrowser1.Navigate "http://www.applevb.com"
End Sub

Private Sub Command2_Click()
    Dim oWindow
    Dim oNav
   
    Set oWindow = WebBrowser1.Document.parentWindow
    Set oNav = oWindow.navigator
    Debug.Print oNav.userAgent
   
    Set oWindow = Nothing
    Set oNav = Nothing
End Sub

点击Command1浏览网页,点击Command2在立即窗口中输出浏览器信息。

2、弹出Webbrowser消息窗口

    Dim oWindow
   
    Set oWindow = WebBrowser1.Document.parentWindow
    oWindow.confirm "abcd"

发表于 @ 2004年07月29日 15:29:00|评论(loading...)

新一篇: VB调用webbrowser技巧集2 | 旧一篇: [大话IT]爆笑电脑维修(转载)

用户操作
[即时聊天] [发私信] [加为好友]
陈锐
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
文章分类
收藏
    Graphics File Formats FAQ
    Adding Custom Buttons to Internet Explorer
    Creating a Windows DLL with Visual Basic
    Graphics File Formats FAQ (Part 1 of 4): General Graphics Format Questions
    Graphics File Formats FAQ (Part 2 of 4): Image Conversion and Display Programs
    Graphics File Formats FAQ (Part 3 of 4): Where to Get File Format Specifications
    Graphics File Formats FAQ (Part 4 of 4): Tips and Tricks of the Trade
    Visual Basic乱七八糟
    朋友的Blog
    小雨的Blog(RSS)
    瓜少之胡言乱语(RSS)
    美女苏胖墩的BLOG
    莫依的博客
    道士摄影
    马宁的Blog(RSS)
    我得主页
    AppleVB
    一些杂七杂八的东西
    40个常用的JS
    存档
    软件项目交易
    Csdn Blog version 3.1a
    Copyright © 陈锐