上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: SaveFileDialog sfd = new SaveFileDialog(); sfd.DefaultExt = "xls"; sfd.Filter = "Excel文?件t(*.xls)|*.xls"; if (sfd.ShowDialog() == Dialo... 阅读全文
posted @ 2015-09-04 18:02 best.lei 阅读(705) 评论(0) 推荐(0)
摘要: C# 获取本机的串口号 using System.IO.Ports; //头文件 string[] PortNames = SerialPort.GetPortNames(); //获取本机串口名称,存入PortNames数组中 for (int i = 0; i < PortNa... 阅读全文
posted @ 2015-09-04 17:57 best.lei 阅读(203) 评论(0) 推荐(0)
摘要: C# 将二进制流转化成图片格式 MemoryStream ms = new MemoryStream(photo); Bitmap bmpt = new Bitmap(ms); //将二进制流转化成图片格式 SickPicture.Image = bmpt; //SickPi... 阅读全文
posted @ 2015-09-04 17:50 best.lei 阅读(522) 评论(0) 推荐(0)
摘要: DSO Framer Control Object 实现加载word文件的不可编辑 axFramerControl1.Open(OldPath); this.axFramerControl1.set_EnableFileCommand(DSOFramer.dsoFileCommandType... 阅读全文
posted @ 2015-08-27 00:30 best.lei 阅读(1331) 评论(0) 推荐(0)
摘要: 将图片转换成二进制插入数据库 FileStream fs = new FileStream("D:\\Add.ico",FileMode.Open); byte[] imagebytes = new byte[fs.Length]; BinaryReader br = new BinaryRe... 阅读全文
posted @ 2015-08-27 00:25 best.lei 阅读(1245) 评论(0) 推荐(0)
摘要: C#MessageBox用法: DialogResult dr = MessageBox.Show("是否删除?", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); if (dr == DialogResul... 阅读全文
posted @ 2015-08-27 00:21 best.lei 阅读(195) 评论(0) 推荐(0)
摘要: private int ExistOrNot(string name) //判断当前数据表是否存在 { con = new SqlConnection(s); DataSet ds = new DataSet(); string strSQL = "select name from syso... 阅读全文
posted @ 2015-08-27 00:21 best.lei 阅读(1553) 评论(0) 推荐(0)
摘要: //CurrentCommunication为解决方案的名字,dynamic为图片的名字pictureBox1.Image = CurrentCommunication.Properties.Resources.dynamic; 阅读全文
posted @ 2015-08-27 00:17 best.lei 阅读(311) 评论(0) 推荐(0)
摘要: 基本信息设置 progressBar1.Maximum = 1000; //设置ProgressBar的最大值 progressBar1.Value = 0; //ProgressBar的初始值 progressBar1.Step = 5; //ProgressBar的增长度 for (i... 阅读全文
posted @ 2015-08-27 00:16 best.lei 阅读(295) 评论(0) 推荐(0)
摘要: c#创建数据库表: private void CreatTable(string name) //创建数据库源数据表,name为表名 { con.ConnectionString = s; con.Open(); string sql = "CREATE TABLE " + name + "(Lin... 阅读全文
posted @ 2015-08-27 00:12 best.lei 阅读(1655) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页