随笔分类 -  winForm

摘要:IDE:VS2022 .NET 5.0 项目文件: 链接:https://pan.baidu.com/s/1jBeXLwWPBvxWk5mrrLLYDw?pwd=9966 提取码:9966 主要代码来源: https://www.cnblogs.com/zzr-stdio/p/12093159.ht 阅读全文
posted @ 2022-03-11 14:34 履霜.1989 阅读(778) 评论(0) 推荐(0) 编辑
摘要:代码大多来源于网络 开发工具:vs2017 项目文件: 链接: https://pan.baidu.com/s/1JIcCo_ZNcsw1U2Z6pB5s_g 提取码: ecjk 界面: 代码: 阅读全文
posted @ 2018-12-25 17:29 履霜.1989 阅读(2437) 评论(1) 推荐(0) 编辑
摘要:1.窗体设计 2.思路 通过遍历数组生成查询条件和查询 3.代码 阅读全文
posted @ 2018-05-23 16:26 履霜.1989 阅读(6036) 评论(2) 推荐(0) 编辑
摘要:获取缩放后字体大小,函数: 调用(在pictureBox的Paint事件中): 阅读全文
posted @ 2018-05-14 11:25 履霜.1989 阅读(2483) 评论(0) 推荐(0) 编辑
摘要:1.菜单栏:工具->扩展和更新->联机,搜索 Microsoft Visual Studio 2017 Installer Project进行下载安装(下载后关闭VS2017会自动安装); 2.打开winForm项目,在解决方案资源管理器中,解决方案名称,右键菜单->添加->新建项目其它项目类型-> 阅读全文
posted @ 2018-05-10 15:32 履霜.1989 阅读(849) 评论(0) 推荐(0) 编辑
摘要:1.窗体:一个label,1个timer; 2:代码 阅读全文
posted @ 2018-05-03 15:22 履霜.1989 阅读(3344) 评论(0) 推荐(0) 编辑
摘要:1.窗体设计:2个button(1个备份(BtnDataBackup),1个恢复(BtnDataRecovery)),1个label(labMsg);1个openFileDialog1(打开选择文件对话窗口); 2:代码 阅读全文
posted @ 2018-05-03 10:49 履霜.1989 阅读(1171) 评论(0) 推荐(1) 编辑
摘要:1.在NuGet安装Newtonsoft.Json(这里只用到解码); 2.窗体设计 3.代码 4:josn文件内容 阅读全文
posted @ 2018-05-03 10:34 履霜.1989 阅读(1020) 评论(0) 推荐(0) 编辑
摘要:1.界面:1个按钮+1个combobox; 2.开头阴影 3.代码 阅读全文
posted @ 2018-04-30 11:02 履霜.1989 阅读(864) 评论(0) 推荐(0) 编辑
摘要://设置tablelayoutpanel控件的DoubleBuffered 属性为true,这样可以减少或消除由于不断重绘所显示图面的某些部分而导致的闪烁 阅读全文
posted @ 2018-04-27 09:34 履霜.1989 阅读(340) 评论(0) 推荐(0) 编辑
摘要:视图->其他窗口->文档大纲。 就可以像PS管理图层顺序一样管理控件层级。 阅读全文
posted @ 2018-04-25 16:30 履霜.1989 阅读(2763) 评论(0) 推荐(0) 编辑
摘要:窗体部分: Form1:主窗体(IsMdiContainer属性设置为true,textBox1的Modifiers属性设置为public) Form2:子窗体 代码部分: //父窗体 Form2 f2 = new Form2(); f2.Owner = this; f2.ShowDialog(); 阅读全文
posted @ 2018-04-24 17:37 履霜.1989 阅读(612) 评论(0) 推荐(0) 编辑
摘要:1.界面 2.窗体代码 3.MoneyToUpper类代码(写在MoneyToUpper.cs文件内) 阅读全文
posted @ 2018-04-24 10:41 履霜.1989 阅读(434) 评论(0) 推荐(0) 编辑
摘要:1.在项目引用NuGet中安装Microsoft.Office.Interop.Excel 2.在cs文件头部添加命名空间 3.窗体界面(灰色部分是datagridview1) 4.代码部分 阅读全文
posted @ 2018-04-23 01:31 履霜.1989 阅读(6365) 评论(0) 推荐(0) 编辑
摘要:注:这种方法有一个问题:无法读取不规范的Excel文件(一般是由于第三方工具自动生成的excel文件,如网页、xml另存为的) 1.在项目引用的NuGet安装NOPI;(除了NOPI还有ExcelDataReader、Spire.XLS、EPPlus等其它第三方库也可以操作Excel文件) 2.在头 阅读全文
posted @ 2018-04-22 10:52 履霜.1989 阅读(1254) 评论(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 阅读(5873) 评论(0) 推荐(0) 编辑
摘要://容器控件为tableLayoutPanel1 foreach (Control label in tableLayoutPanel1.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") ... 阅读全文
posted @ 2018-04-20 15:01 履霜.1989 阅读(1507) 评论(0) 推荐(1) 编辑
摘要:using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Printing; 阅读全文
posted @ 2018-04-20 14:45 履霜.1989 阅读(2175) 评论(0) 推荐(0) 编辑
摘要:1.打印控件介绍(Document属性设置为PrintDocument1;ShowDialog()方法显示对话窗) PrintDialog控件(打印会话):用于选择打印机、选择要打印的页以及确定其他与打印相关的设置。 PrintPreviewControl控件(打印预览控制):用于按文档打印时的外观 阅读全文
posted @ 2018-04-17 00:12 履霜.1989 阅读(1517) 评论(0) 推荐(0) 编辑
摘要:1.固定一边(Pannel1)大小 splitContainer:IsSpliterFixed属性设为False; splitContainer:FixedPannel属性设为Pannel1 阅读全文
posted @ 2018-04-16 18:25 履霜.1989 阅读(1796) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示