2013年2月22日
摘要: 将RichTextBox的内容直接写入数据库:privatevoidbutton1_Click(objectsender,EventArgse){System.IO.MemoryStreammstream=newSystem.IO.MemoryStream();this.richTextBox1.SaveFile(mstream,RichTextBoxStreamType.RichText);//将流转换成数组byte[]bWrite=mstream.ToArray();//将数组写入数据库System.Data.SqlClient.SqlParameter[]pram={sqlHelper. 阅读全文
posted @ 2013-02-22 09:56 潴潴黠 阅读(225) 评论(0) 推荐(0)
摘要: 最近在做个项目,要求在一个panel里面显示一个form,想了很久,最后才发现原来不过如此: Form1 f = new Form1(); f.TopLevel = false; f.Dock = System.Windows.Forms.DockStyle.Fill; // f.FormBorderStyle = FormBorderStyle.None; panel1.Controls.Add(f); f.Show(); 阅读全文
posted @ 2013-02-22 09:40 潴潴黠 阅读(309) 评论(0) 推荐(0)