commondialog.showsave 怎么用啊? CDlg.ShowSaveCDlg.FileName 是獲得文件的路徑和名稱 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Private Sub Command1_Click()' 设置“CancelError”为 TrueCommonDialog1.CancelError = TrueOn Error GoTo ErrHandler' 设置标志CommonDialog1.Flags = cdlOFNHideReadOnly' 设置过滤器CommonDialog1.Filter = "All Files (*.*)|*.*|Text Files" & _"(*.txt)|*.txt|Batch Files (*.bat)|*.bat"' 指定缺省的过滤器CommonDialog1.FilterIndex = 2' 显示“打开”对话框CommonDialog1.ShowSave' 显示选定文件的名字MsgBox CommonDialog1.filenameExit SubErrHandler:' 用户按了“取消”按钮Exit SubEnd Sub 和FSO对象配合起来使用效果会更好 我用了WebBrowser控件,我想知道如何用ShowSave把当前页面存储下来?一定给分的 cdgMain.Flags = cdlOFNHideReadOnlycdgMain.DefaultExt = "htm"cdgMain.Filter = _ "HTML Files(*.htm *.html)|*.htm;*.html|All Files(*.*)|*.*"cdgMain.InitDir = App.Path'cdgMain.FileTitle = brwWebBrowser.LocationNamecdgMain.ShowSave上面注释那一句总提示property is read-only cdgMain.Filename = brwWebBrowser.LocationName Jneu(沧海桑田) 这样写不行。 cdgMain.DialogTitle = brwWebBrowser.LocationName 这是commondialog.showsave 显示打开对话框的方法。Jneu说的对,就那样用。被选定的文件路径,就是commondialog.filename 属性 就是如何通过commondialog对话框把WebBrowser的叶面内容存储倒一个*.htm文件当中要有存储过程。譬如CommonDialog1.CancelError = FalseCommonDialog1.DefaultExt = "txt"CommonDialog1.InitDir = "c:\temp"CommonDialog1.Filter = "Text Files|*.txt|All Files|*.*"CommonDialog1.ShowOpenIf CommonDialog1.FileTitle = Empty Then Exit SubEnd IfRichTextBox1.LoadFile (CommonDialog1.FileName)打开文件CommonDialog1.CancelError = FalseCommonDialog1.DefaultExt = "txt"CommonDialog1.InitDir = "c:\temp"CommonDialog1.Filter = "Text Files|*.txt|All Files|*.*"CommonDialog1.ShowSaveRichTextBox1.SaveFile (CommonDialog1.FileName)存储文件现在我只想通过commondialog对话框把WebBrowser的叶面内容存储倒一个*.htm文件当中 具体怎么实现存储过程?譬如给定浏览页面brwWebBrowser的文件名是 新浪地址是 http://www.sina.com.cn现在存储成ttt.htm怎么存储?可以加倒300分 CommonDialog1.Action = 1(~5 自己试) VB调用DELPHI的动态链接库,有个回调函数 CommonDialog 在为ShowOpen 和 ShowSave 时,怎么判断输入的后缀名呢 VB中如何传递指针参数来调用DLL? 表单上有很多Label,上面有大片的文字,怎么让用户点击表单上任何地方都可以关闭表单? 大难题:VB6 中怎么调试跟踪dll???着急啊! 关于串口通讯的问题!! 在线求救 谁有api说明? 导出数据到Excel时,如果没有安装Office,可以吗? 测试adoconnection是否已关闭 高手请进,有分送!!!! *****九月十五号在沈阳五里河体育场《中乌之战》答错者给分?????
' 设置“CancelError”为 True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' 设置标志
CommonDialog1.Flags = cdlOFNHideReadOnly
' 设置过滤器
CommonDialog1.Filter = "All Files (*.*)|*.*|Text Files" & _
"(*.txt)|*.txt|Batch Files (*.bat)|*.bat"
' 指定缺省的过滤器
CommonDialog1.FilterIndex = 2
' 显示“打开”对话框
CommonDialog1.ShowSave
' 显示选定文件的名字
MsgBox CommonDialog1.filename
Exit SubErrHandler:
' 用户按了“取消”按钮
Exit Sub
End Sub
一定给分的
cdgMain.DefaultExt = "htm"
cdgMain.Filter = _
"HTML Files(*.htm *.html)|*.htm;*.html|All Files(*.*)|*.*"
cdgMain.InitDir = App.Path
'cdgMain.FileTitle = brwWebBrowser.LocationName
cdgMain.ShowSave
上面注释那一句总提示property is read-only
要有存储过程。譬如
CommonDialog1.CancelError = False
CommonDialog1.DefaultExt = "txt"
CommonDialog1.InitDir = "c:\temp"
CommonDialog1.Filter = "Text Files|*.txt|All Files|*.*"
CommonDialog1.ShowOpenIf CommonDialog1.FileTitle = Empty Then
Exit Sub
End IfRichTextBox1.LoadFile (CommonDialog1.FileName)
打开文件
CommonDialog1.CancelError = False
CommonDialog1.DefaultExt = "txt"
CommonDialog1.InitDir = "c:\temp"
CommonDialog1.Filter = "Text Files|*.txt|All Files|*.*"
CommonDialog1.ShowSave
RichTextBox1.SaveFile (CommonDialog1.FileName)
存储文件现在我只想通过commondialog对话框把WebBrowser的叶面内容存储倒一个*.htm文件当中
譬如给定浏览页面
brwWebBrowser的文件名是 新浪
地址是 http://www.sina.com.cn
现在存储成ttt.htm
怎么存储?可以加倒300分