给自己的程序增加网页浏览功能(续)[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 cutemouse 的 blog

 给自己的程序增加网页浏览功能(续)

 

private sub mnufilesaveas_click()

   

brwwebbrowser.setfocus

on error resume next

brwwebbrowser.execwb olecmdid_saveas, olecmdexecopt_dodefault

另存为   

    以下是用原始的方式另存为

'    dim sfile as string

'

'

'    with dlgcommondialog

'        .dialogtitle = "另存为..."

'        .cancelerror = false

'        '.filename = me.brwwebbrowser.locationname

'        'todo: 设置 common dialog 控件的标志和属性

'        .filter = "html文件(*.html,*.htm)|*.html;*htm|文本文件(*.txt)|*.txt|asp文件(*.asp)|*.asp" & _

'                "|图形文件(*.bmp;*.jpg;*.jpeg;*.gif)|*.bmp;*.jpg;*.jpeg;*.gif|所有文件(*.*)|*.*"

'        .showsave

'        if len(.filename) = 0 then

'            exit sub

'        end if

'        sfile = .filename

'    end with

'    'todo: 添加处理打开的文件的代码

'    brwwebbrowser.navigate sfile

'

本文关键:WEBBROWSER控件和INTERNET EXPLORER AUTOMATION
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top