给自己的程序增加网页浏览功能(续)
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
'