摘要: 注:这种方法有一个问题:无法读取不规范的Excel文件(一般是由于第三方工具自动生成的excel文件,如网页、xml另存为的) 1.在项目引用的NuGet安装NOPI;(除了NOPI还有ExcelDataReader、Spire.XLS、EPPlus等其它第三方库也可以操作Excel文件) 2.在头 阅读全文
posted @ 2018-04-22 10:52 履霜.1989 阅读(1271) 评论(0) 推荐(0)
摘要: 1.用label填充tableLayoutPanel1单元格,label的属性设置为: anchor:Top, Bottom, Left, Right; Dock:Fill; margin:1,1,1,1 Rowspan:2;//根据需要 TextAline:MiddleCenter; 其他属性默认 阅读全文
posted @ 2018-04-21 15:05 履霜.1989 阅读(5962) 评论(0) 推荐(0)
摘要: //容器控件为tableLayoutPanel1 foreach (Control label in tableLayoutPanel1.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") ... 阅读全文
posted @ 2018-04-20 15:01 履霜.1989 阅读(1567) 评论(0) 推荐(1)
摘要: using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Printing; 阅读全文
posted @ 2018-04-20 14:45 履霜.1989 阅读(2209) 评论(0) 推荐(0)
摘要: 1.打印控件介绍(Document属性设置为PrintDocument1;ShowDialog()方法显示对话窗) PrintDialog控件(打印会话):用于选择打印机、选择要打印的页以及确定其他与打印相关的设置。 PrintPreviewControl控件(打印预览控制):用于按文档打印时的外观 阅读全文
posted @ 2018-04-17 00:12 履霜.1989 阅读(1560) 评论(0) 推荐(0)
摘要: 1.固定一边(Pannel1)大小 splitContainer:IsSpliterFixed属性设为False; splitContainer:FixedPannel属性设为Pannel1 阅读全文
posted @ 2018-04-16 18:25 履霜.1989 阅读(1818) 评论(0) 推荐(0)
摘要: 属性: PasswordChar 属性:是一个字符串类型,允许设置一个字符,运行程序时,将输入到 Text 的内容全部显示为该属性值,从而起到保密作用,通常用来输入口令或密码。 DialogResult 属性:当使用 ShowDialog 方法显示窗体时,可以使用该属性设置当用户按了某按钮后,Sho 阅读全文
posted @ 2018-04-15 17:36 履霜.1989 阅读(8464) 评论(0) 推荐(1)
摘要: 1.窗体 属性: 方法: 事件: 阅读全文
posted @ 2018-04-15 15:48 履霜.1989 阅读(6403) 评论(0) 推荐(0)
摘要: 在窗口的resize事件中写代码 阅读全文
posted @ 2018-04-13 15:46 履霜.1989 阅读(1283) 评论(0) 推荐(1)
摘要: 1.修改Program.cs文件 默认: 改为: 2.在登录窗体中,当登录成功时调用 阅读全文
posted @ 2018-04-13 10:46 履霜.1989 阅读(444) 评论(0) 推荐(0)