1public void DataToExcel(DataGridView m_DataView) 2 { 3 SaveFileDialog kk = new SaveFileDialog(); 4 kk.Title = "保存EXECL...
public void ResMsg() { while (isRecMsg) { //准备一个数组 准备接收 服务端发来的数据 byte[] msgRec = new byte[1024 * 1024 * 2]; //接收服务端发来的数据,此方法也会阻断当前线程,并返回接收的数据的长度 int r...
在子线程中使用 SaveFileDialog 无法弹出窗体,主要是我们需要用主线程去处理 SaveFileDialog ,我们可以将子线程进行如下设置:public partial class Form1 : Form { public Form1() { InitializeComponent()...
分类:
编程语言 时间:
2014-12-29 18:15:48
阅读次数:
187
private void button1_Click(object sender, EventArgs e) { saveFileDialog1.Filter = "*.txt|*.txt|*.exe|*.exe";//设置文件筛选条件,只保存文本和可执行文件 ...
分类:
其他好文 时间:
2014-12-14 23:58:56
阅读次数:
334
OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = strOpenFileFolder;//初始目录,不赋值也可以openFileDialog1.Filter = “mxm...
1、导入Excel //通过SaveFileDialog类弹出一个保存对话框 SaveFileDialog sfd = new SaveFileDialog(); //设置文件的保存类型,默认选中Excel文件 sfd.Filter ...
分类:
其他好文 时间:
2014-12-04 17:48:07
阅读次数:
231
SaveFileDialog sfd = new SaveFileDialog();sfd.Filter = "文本文件 (*.txt)|*.txt|所有文件 (*.*)|*.*";if(sfd.ShowDialog() == DialogResult.Cancel) return;bool...
分类:
其他好文 时间:
2014-11-17 09:09:32
阅读次数:
328
#region 示例1 SaveFileDialog sfd = new SaveFileDialog(); //设置文件类型 sfd.Filter = "备份文件(*.bak)|*.bak"; ...
private void btnOpen_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { ...
分类:
其他好文 时间:
2014-11-04 21:07:47
阅读次数:
158
1.直接将DataGridView显示的内容导出Excel public void DataToExcel(DataGridView m_DataView) { SaveFileDialog kk = new SaveFileDialog(); ...
分类:
其他好文 时间:
2014-10-15 12:04:05
阅读次数:
163