Winform开发遇到问题
Xuzy_1995
执行者
展开
-
Winform开发遇到的问题之控件重绘[针对边框颜色]
1.代码块: //重绘方法(Paint) private void txt_Paint(object sender, PaintEventArgs e) { //读取配置文件的宽和高 int x =Convert.ToInt32(AppConfig.width); int ...原创 2018-08-27 10:33:59 · 1305 阅读 · 0 评论 -
Winform开发遇到的问题之分割字符[具有换行符的字符串]
// c.Text="区域名称:A栋\r\n区域人数:4" 定义的字符串string[] sub = c.Text.Split(':');string[] areaname = sub[1].Split(new string[] { "\r\n" }, StringSplitOptions.None);areaname = areaname.Where(s => !string....原创 2018-08-24 14:33:36 · 439 阅读 · 0 评论 -
Winform开发遇到的问题之窗体内控件自适应
1.AutoSizeFormClass.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;namespace AlignmentInfo{ class AutoSizeFormClass {...原创 2018-08-24 14:31:12 · 356 阅读 · 0 评论 -
Winform开发遇到的问题之查找动态生成的控件
1.遍历控件: //gbfill.Control:需要遍历的容器 foreach (Control vControl in gbfill.Controls) { //需要查找的控件 if (vControl is Label) ...原创 2018-08-24 14:28:25 · 751 阅读 · 0 评论 -
Winform开发遇到的问题之TextBox与ChenckedListBox
1.代码块: //CheckListBox:名称AreaList,TextBox:名称txt_Area[重点:控件的事件要选对] /// <summary> /// CheckedListBox与TetxBox组合使用 /// </summary> /// <param name="s...原创 2018-08-24 14:20:06 · 229 阅读 · 0 评论 -
Winform开发遇到的问题之TabPage选项卡禁用
1.代码块: //默认加载 private void Form1_Load(object sender, EventArgs e) { tabPage(); } //选项卡默认值 private void tabPage() { fo...原创 2018-08-24 14:16:35 · 2681 阅读 · 0 评论 -
Winform开发遇到的问题之TabContor标签栏隐藏
1.代码块: this.tab3.Parent = null;//隐藏 this.tab3.Parent = this.tabControl1;//显示2.隐藏前效果图: 3.隐藏后效果图原创 2018-08-24 14:05:48 · 399 阅读 · 0 评论 -
Winform开发遇到的问题之DataGridView导出Excel
1.代码块: //Excel导出功能 public static void ExportExcel(string fileName, DataGridView dgv) { if (dgv.Rows.Count > 0) { string saveFileNam...原创 2018-08-24 14:00:43 · 320 阅读 · 0 评论 -
Winform开发遇到的问题之DataGridView改变某列的显示效果
1.代码块: private void dgv_faceinfo_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) { foreach (DataGridViewRow item in dgv_faceinfo.Rows) {...原创 2018-08-24 13:54:18 · 949 阅读 · 0 评论 -
Winform开发遇到的问题之comBox绑定DataSet数据
1.代码块: private void VeriFace_Load(object sender, EventArgs e) { //绑定服务器Ip地址 DataSet ds = faceService.GetAllList(); this.cmb_serverid.DisplayMembe...原创 2018-08-24 13:49:17 · 619 阅读 · 0 评论 -
Winform开发遇到的问题之有无参线程和委托
对于线程与委托的知识也不是了解的很多,仅限稍微的使用而已。也是百度去参考教程而已1.实体类: /// <summary> /// 实体类 /// </summary> public class TestModue { private int id; public int Id ...原创 2018-08-27 11:30:58 · 146 阅读 · 0 评论 -
Winform开发遇到的问题之拖拽控件
1.代码块: //记录鼠标拖放 bool bMouseDown; Point po = Point.Empty; //生成的控件 Label lbl = null; TextBox txt = null; /// &lt;summary&gt; /// 窗体加载 ...原创 2018-08-27 11:22:50 · 925 阅读 · 0 评论 -
Winform开发遇到的问题之生成拖拽控件
1.代码块: //记录位置 Point po = Point.Empty; //生成的控件 Label lbl = null; Label txt = null; // 接口方法 RegionlStaffQueryManager rsqm = new RegionlStaffQu...原创 2018-08-27 11:00:44 · 342 阅读 · 0 评论 -
Winform开发遇到的问题之截屏功能
1.代码块: //定义图片 public static Bitmap image { get; set; } /// <summary> /// 截图按钮 /// </summary> /// <param name="sender"></param>...原创 2018-08-24 14:42:40 · 345 阅读 · 0 评论