本文介绍了如何自定义FileSaveDialog框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在SaveFileDialog框中添加一个复选框控件.能否找到一个示例hookproc职员.

private void button1_Click(对象发送者,EventArgs e)
{
流myStream;
SaveFileDialog saveFileDialog1 =新的SaveFileDialog();

saveFileDialog1.Filter ="txt文件(* .txt)| * .txt |所有文件(*.*)| *.*";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;


如果(saveFileDialog1.ShowDialog()== DialogResult.OK)
{
如果((myStream = saveFileDialog1.OpenFile())!= null)
{
//编写流的代码在这里.
myStream.Close();
}
}
}

I would like to add a checkbox control in the SaveFileDialog box. could it be possible to find an example hookproc staff.

private void button1_Click(object sender, EventArgs e)
{
Stream myStream;
SaveFileDialog saveFileDialog1 = new SaveFileDialog();

saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;


if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
if ((myStream = saveFileDialog1.OpenFile()) != null)
{
// Code to write the stream goes here.
myStream.Close();
}
}
}

推荐答案


这篇关于如何自定义FileSaveDialog框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 01:13