关于C# 在SaveFileDialog里的一些问题

ccp5780199 2006-09-25 10:59:19
怎么设置让按下后保存文件对话框里面的文件名 默认是FileName + 后缀
先谢谢了
...全文
363 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccp5780199 2006-09-25
  • 打赏
  • 举报
回复
谢谢两位拉。。
wl22817560 2006-09-25
  • 打赏
  • 举报
回复
http://community.csdn.net/Expert/topic/5045/5045049.xml?temp=.7106897
借点人气 找人帮帮忙
xiao_p 2006-09-25
  • 打赏
  • 举报
回复
// Set the properties on SaveFileDialog1 so the user is
// prompted to create the file if it doesn't exist
// or overwrite the file if it does exist.
SaveFileDialog1.CreatePrompt = true;
SaveFileDialog1.OverwritePrompt = true;

// Set the file name to myText.txt, set the type filter
// to text files, and set the initial directory to drive C.
SaveFileDialog1.FileName = "myText";
SaveFileDialog1.DefaultExt = "txt";
SaveFileDialog1.Filter = "Text files (*.txt)|*.txt";
SaveFileDialog1.InitialDirectory = "c:\\";
xiao_p 2006-09-25
  • 打赏
  • 举报
回复
msdn上面有很详细的描述,自己查一下就ok了。

110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧