官网

http://www.hzhcontrols.com

前提

入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章。

GitHub:https://github.com/kwwwvagaa/NetWinformControl

码云:https://gitee.com/kwwwvagaa/net_winform_custom_control.git

如果觉得写的还行,请点个 star 支持一下吧

欢迎前来交流探讨: 企鹅群568015492 

idkey=6e08741ef16fe53bf0314c1c9e336c4f626047943a8b76bac062361bab6b4f8d">

目录

https://www.cnblogs.com/bfyx/p/11364884.html

准备工作

这是一个提示消息的窗体,他继承自基类窗体FrmBase,如果你对FrmBase还不了解,请移步 (十七)c#Winform自定义控件-基类窗体 查看

提示消息窗体支持有确定取消按钮及单取消按钮,更多操作按钮暂没有增加

开始

添加一个Form命名为FrmDialog ,继承FrmBase

私有的构造函数

  1. private FrmDialog(
  2. string strMessage,
  3. string strTitle,
  4. bool blnShowCancel = false,
  5. bool blnShowClose = false,
  6. bool blnisEnterClose = true)
  7. {
  8. InitializeComponent();
  9. if (!string.IsNullOrWhiteSpace(strTitle))
  10. lblTitle.Text = strTitle;
  11. lblMsg.Text = strMessage;
  12. if (blnShowCancel)
  13. {
  14. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  15. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  16. }
  17. else
  18. {
  19. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  20. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  21. }
  22. btnClose.Visible = blnShowClose;
  23. blnEnterClose = blnisEnterClose;
  24. }

搭配一个静态的公共函数

  1. #region 显示一个模式信息框
  2. /// <summary>
  3. /// 功能描述:显示一个模式信息框
  4. /// 作  者:HZH
  5. /// 创建日期:2019-03-04 15:49:48
  6. /// 任务编号:POS
  7. /// </summary>
  8. /// <param name="owner">owner</param>
  9. /// <param name="strMessage">strMessage</param>
  10. /// <param name="strTitle">strTitle</param>
  11. /// <param name="blnShowCancel">blnShowCancel</param>
  12. /// <param name="isShowMaskDialog">isShowMaskDialog</param>
  13. /// <param name="blnShowClose">blnShowClose</param>
  14. /// <param name="isEnterClose">isEnterClose</param>
  15. /// <returns>返回值</returns>
  16. public static DialogResult ShowDialog(
  17. IWin32Window owner,
  18. string strMessage,
  19. string strTitle = "提示",
  20. bool blnShowCancel = false,
  21. bool isShowMaskDialog = true,
  22. bool blnShowClose = false,
  23. bool blnIsEnterClose = true)
  24. {
  25. DialogResult result = DialogResult.Cancel;
  26. if (owner == null || (owner is Control && (owner as Control).IsDisposed))
  27. {
  28. result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
  29. {
  30. StartPosition = FormStartPosition.CenterScreen,
  31. IsShowMaskDialog = isShowMaskDialog,
  32. TopMost = true
  33. }.ShowDialog();
  34. }
  35. else
  36. {
  37. if (owner is Control)
  38. {
  39. owner = (owner as Control).FindForm();
  40. }
  41. result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
  42. {
  43. StartPosition = (owner != null) ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen,
  44. IsShowMaskDialog = isShowMaskDialog,
  45. TopMost = true
  46. }.ShowDialog(owner);
  47. }
  48. return result;
  49. }
  50. #endregion

一些小事件

  1. private void btnOK_BtnClick(object sender, EventArgs e)
  2. {
  3. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  4. }
  5.  
  6. private void btnCancel_BtnClick(object sender, EventArgs e)
  7. {
  8. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  9. }
  10.  
  11. private void btnClose_MouseDown(object sender, MouseEventArgs e)
  12. {
  13. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  14. }
  15.  
  16. protected override void DoEnter()
  17. {
  18. if (blnEnterClose)
  19. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  20. }

代码就这么多,看下完整代码

  1. // 版权所有 黄正辉 交流群:568015492 QQ:623128629
  2. // 文件名称:FrmDialog.cs
  3. // 创建日期:2019-08-15 16:04:36
  4. // 功能描述:FrmDialog
  5. // 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control
  6. using System;
  7. using System.Collections.Generic;
  8. using System.ComponentModel;
  9. using System.Data;
  10. using System.Drawing;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Windows.Forms;
  14.  
  15. namespace HZH_Controls.Forms
  16. {
  17. public partial class FrmDialog : FrmBase
  18. {
  19. bool blnEnterClose = true;
  20. private FrmDialog(
  21. string strMessage,
  22. string strTitle,
  23. bool blnShowCancel = false,
  24. bool blnShowClose = false,
  25. bool blnisEnterClose = true)
  26. {
  27. InitializeComponent();
  28. if (!string.IsNullOrWhiteSpace(strTitle))
  29. lblTitle.Text = strTitle;
  30. lblMsg.Text = strMessage;
  31. if (blnShowCancel)
  32. {
  33. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  34. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  35. }
  36. else
  37. {
  38. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  39. this.tableLayoutPanel1.ColumnStyles[].Width = ;
  40. }
  41. //btnCancel.Visible = blnShowCancel;
  42. //ucSplitLine_V1.Visible = blnShowCancel;
  43. btnClose.Visible = blnShowClose;
  44. blnEnterClose = blnisEnterClose;
  45. //if (blnShowCancel)
  46. //{
  47. // btnOK.BtnForeColor = Color.FromArgb(255, 85, 51);
  48. //}
  49. }
  50.  
  51. #region 显示一个模式信息框
  52. /// <summary>
  53. /// 功能描述:显示一个模式信息框
  54. /// 作  者:HZH
  55. /// 创建日期:2019-03-04 15:49:48
  56. /// 任务编号:POS
  57. /// </summary>
  58. /// <param name="owner">owner</param>
  59. /// <param name="strMessage">strMessage</param>
  60. /// <param name="strTitle">strTitle</param>
  61. /// <param name="blnShowCancel">blnShowCancel</param>
  62. /// <param name="isShowMaskDialog">isShowMaskDialog</param>
  63. /// <param name="blnShowClose">blnShowClose</param>
  64. /// <param name="isEnterClose">isEnterClose</param>
  65. /// <returns>返回值</returns>
  66. public static DialogResult ShowDialog(
  67. IWin32Window owner,
  68. string strMessage,
  69. string strTitle = "提示",
  70. bool blnShowCancel = false,
  71. bool isShowMaskDialog = true,
  72. bool blnShowClose = false,
  73. bool blnIsEnterClose = true)
  74. {
  75. DialogResult result = DialogResult.Cancel;
  76. if (owner == null || (owner is Control && (owner as Control).IsDisposed))
  77. {
  78. result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
  79. {
  80. StartPosition = FormStartPosition.CenterScreen,
  81. IsShowMaskDialog = isShowMaskDialog,
  82. TopMost = true
  83. }.ShowDialog();
  84. }
  85. else
  86. {
  87. if (owner is Control)
  88. {
  89. owner = (owner as Control).FindForm();
  90. }
  91. result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
  92. {
  93. StartPosition = (owner != null) ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen,
  94. IsShowMaskDialog = isShowMaskDialog,
  95. TopMost = true
  96. }.ShowDialog(owner);
  97. }
  98. return result;
  99. }
  100. #endregion
  101.  
  102. private void btnOK_BtnClick(object sender, EventArgs e)
  103. {
  104. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  105. }
  106.  
  107. private void btnCancel_BtnClick(object sender, EventArgs e)
  108. {
  109. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  110. }
  111.  
  112. private void btnClose_MouseDown(object sender, MouseEventArgs e)
  113. {
  114. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  115. }
  116.  
  117. protected override void DoEnter()
  118. {
  119. if (blnEnterClose)
  120. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  121. }
  122.  
  123. private void FrmDialog_VisibleChanged(object sender, EventArgs e)
  124. {
  125.  
  126. }
  127. }
  128. }
  1. namespace HZH_Controls.Forms
  2. {
  3. partial class FrmDialog
  4. {
  5. /// <summary>
  6. /// Required designer variable.
  7. /// </summary>
  8. private System.ComponentModel.IContainer components = null;
  9.  
  10. /// <summary>
  11. /// Clean up any resources being used.
  12. /// </summary>
  13. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14. protected override void Dispose(bool disposing)
  15. {
  16. if (disposing && (components != null))
  17. {
  18. components.Dispose();
  19. }
  20. base.Dispose(disposing);
  21. }
  22.  
  23. #region Windows Form Designer generated code
  24.  
  25. /// <summary>
  26. /// Required method for Designer support - do not modify
  27. /// the contents of this method with the code editor.
  28. /// </summary>
  29. private void InitializeComponent()
  30. {
  31. System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDialog));
  32. this.btnClose = new System.Windows.Forms.Panel();
  33. this.panel1 = new System.Windows.Forms.Panel();
  34. this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
  35. this.btnCancel = new HZH_Controls.Controls.UCBtnExt();
  36. this.ucSplitLine_V1 = new HZH_Controls.Controls.UCSplitLine_V();
  37. this.btnOK = new HZH_Controls.Controls.UCBtnExt();
  38. this.lblMsg = new System.Windows.Forms.Label();
  39. this.lblTitle = new System.Windows.Forms.Label();
  40. this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
  41. this.ucSplitLine_H2 = new HZH_Controls.Controls.UCSplitLine_H();
  42. this.panel1.SuspendLayout();
  43. this.tableLayoutPanel1.SuspendLayout();
  44. this.SuspendLayout();
  45. //
  46. // btnClose
  47. //
  48. this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
  49. this.btnClose.BackgroundImage = global::HZH_Controls.Properties.Resources.dialog_close;
  50. this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
  51. this.btnClose.Location = new System.Drawing.Point(, );
  52. this.btnClose.Name = "btnClose";
  53. this.btnClose.Size = new System.Drawing.Size(, );
  54. this.btnClose.TabIndex = ;
  55. this.btnClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnClose_MouseDown);
  56. //
  57. // panel1
  58. //
  59. this.panel1.Controls.Add(this.tableLayoutPanel1);
  60. this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
  61. this.panel1.Location = new System.Drawing.Point(, );
  62. this.panel1.Name = "panel1";
  63. this.panel1.Size = new System.Drawing.Size(, );
  64. this.panel1.TabIndex = ;
  65. //
  66. // tableLayoutPanel1
  67. //
  68. this.tableLayoutPanel1.ColumnCount = ;
  69. this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
  70. this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 1F));
  71. this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
  72. this.tableLayoutPanel1.Controls.Add(this.btnCancel, , );
  73. this.tableLayoutPanel1.Controls.Add(this.ucSplitLine_V1, , );
  74. this.tableLayoutPanel1.Controls.Add(this.btnOK, , );
  75. this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  76. this.tableLayoutPanel1.Location = new System.Drawing.Point(, );
  77. this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding();
  78. this.tableLayoutPanel1.Name = "tableLayoutPanel1";
  79. this.tableLayoutPanel1.RowCount = ;
  80. this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
  81. this.tableLayoutPanel1.Size = new System.Drawing.Size(, );
  82. this.tableLayoutPanel1.TabIndex = ;
  83. //
  84. // btnCancel
  85. //
  86. this.btnCancel.BackColor = System.Drawing.Color.Transparent;
  87. this.btnCancel.BtnBackColor = System.Drawing.Color.Transparent;
  88. this.btnCancel.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
  89. this.btnCancel.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  90. this.btnCancel.BtnText = "取消";
  91. this.btnCancel.ConerRadius = ;
  92. this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
  93. this.btnCancel.Dock = System.Windows.Forms.DockStyle.Fill;
  94. this.btnCancel.FillColor = System.Drawing.Color.White;
  95. this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
  96. this.btnCancel.IsRadius = false;
  97. this.btnCancel.IsShowRect = false;
  98. this.btnCancel.IsShowTips = false;
  99. this.btnCancel.Location = new System.Drawing.Point(, );
  100. this.btnCancel.Margin = new System.Windows.Forms.Padding();
  101. this.btnCancel.Name = "btnCancel";
  102. this.btnCancel.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  103. this.btnCancel.RectWidth = ;
  104. this.btnCancel.Size = new System.Drawing.Size(, );
  105. this.btnCancel.TabIndex = ;
  106. this.btnCancel.TabStop = false;
  107. this.btnCancel.TipsText = "";
  108. this.btnCancel.BtnClick += new System.EventHandler(this.btnCancel_BtnClick);
  109. //
  110. // ucSplitLine_V1
  111. //
  112. this.ucSplitLine_V1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  113. this.ucSplitLine_V1.Dock = System.Windows.Forms.DockStyle.Fill;
  114. this.ucSplitLine_V1.Location = new System.Drawing.Point(, );
  115. this.ucSplitLine_V1.Margin = new System.Windows.Forms.Padding(, , , );
  116. this.ucSplitLine_V1.Name = "ucSplitLine_V1";
  117. this.ucSplitLine_V1.Size = new System.Drawing.Size(, );
  118. this.ucSplitLine_V1.TabIndex = ;
  119. this.ucSplitLine_V1.TabStop = false;
  120. //
  121. // btnOK
  122. //
  123. this.btnOK.BackColor = System.Drawing.Color.Transparent;
  124. this.btnOK.BtnBackColor = System.Drawing.Color.Transparent;
  125. this.btnOK.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
  126. this.btnOK.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  127. this.btnOK.BtnText = "确定";
  128. this.btnOK.ConerRadius = ;
  129. this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
  130. this.btnOK.Dock = System.Windows.Forms.DockStyle.Fill;
  131. this.btnOK.FillColor = System.Drawing.Color.White;
  132. this.btnOK.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
  133. this.btnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  134. this.btnOK.IsRadius = false;
  135. this.btnOK.IsShowRect = false;
  136. this.btnOK.IsShowTips = false;
  137. this.btnOK.Location = new System.Drawing.Point(, );
  138. this.btnOK.Margin = new System.Windows.Forms.Padding();
  139. this.btnOK.Name = "btnOK";
  140. this.btnOK.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  141. this.btnOK.RectWidth = ;
  142. this.btnOK.Size = new System.Drawing.Size(, );
  143. this.btnOK.TabIndex = ;
  144. this.btnOK.TabStop = false;
  145. this.btnOK.TipsText = "";
  146. this.btnOK.BtnClick += new System.EventHandler(this.btnOK_BtnClick);
  147. //
  148. // lblMsg
  149. //
  150. this.lblMsg.BackColor = System.Drawing.Color.White;
  151. this.lblMsg.Dock = System.Windows.Forms.DockStyle.Fill;
  152. this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 12F);
  153. this.lblMsg.Location = new System.Drawing.Point(, );
  154. this.lblMsg.Name = "lblMsg";
  155. this.lblMsg.Padding = new System.Windows.Forms.Padding();
  156. this.lblMsg.Size = new System.Drawing.Size(, );
  157. this.lblMsg.TabIndex = ;
  158. this.lblMsg.Text = "这是一个提示信息。";
  159. //
  160. // lblTitle
  161. //
  162. this.lblTitle.BackColor = System.Drawing.Color.Transparent;
  163. this.lblTitle.Dock = System.Windows.Forms.DockStyle.Top;
  164. this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 17F);
  165. this.lblTitle.Location = new System.Drawing.Point(, );
  166. this.lblTitle.Name = "lblTitle";
  167. this.lblTitle.Size = new System.Drawing.Size(, );
  168. this.lblTitle.TabIndex = ;
  169. this.lblTitle.Text = "提示";
  170. this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  171. //
  172. // ucSplitLine_H1
  173. //
  174. this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  175. this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Top;
  176. this.ucSplitLine_H1.Location = new System.Drawing.Point(, );
  177. this.ucSplitLine_H1.Name = "ucSplitLine_H1";
  178. this.ucSplitLine_H1.Size = new System.Drawing.Size(, );
  179. this.ucSplitLine_H1.TabIndex = ;
  180. this.ucSplitLine_H1.TabStop = false;
  181. //
  182. // ucSplitLine_H2
  183. //
  184. this.ucSplitLine_H2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
  185. this.ucSplitLine_H2.Dock = System.Windows.Forms.DockStyle.Bottom;
  186. this.ucSplitLine_H2.Location = new System.Drawing.Point(, );
  187. this.ucSplitLine_H2.Name = "ucSplitLine_H2";
  188. this.ucSplitLine_H2.Size = new System.Drawing.Size(, );
  189. this.ucSplitLine_H2.TabIndex = ;
  190. this.ucSplitLine_H2.TabStop = false;
  191. //
  192. // FrmDialog
  193. //
  194. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
  195. this.BackColor = System.Drawing.Color.White;
  196. this.ClientSize = new System.Drawing.Size(, );
  197. this.Controls.Add(this.ucSplitLine_H2);
  198. this.Controls.Add(this.ucSplitLine_H1);
  199. this.Controls.Add(this.btnClose);
  200. this.Controls.Add(this.panel1);
  201. this.Controls.Add(this.lblMsg);
  202. this.Controls.Add(this.lblTitle);
  203. this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  204. this.IsFullSize = false;
  205. this.IsShowRegion = true;
  206. this.Name = "FrmDialog";
  207. this.Redraw = true;
  208. this.ShowIcon = false;
  209. this.ShowInTaskbar = false;
  210. this.Text = "FrmDialoag";
  211. this.VisibleChanged += new System.EventHandler(this.FrmDialog_VisibleChanged);
  212. this.panel1.ResumeLayout(false);
  213. this.tableLayoutPanel1.ResumeLayout(false);
  214. this.ResumeLayout(false);
  215.  
  216. }
  217.  
  218. #endregion
  219.  
  220. private System.Windows.Forms.Label lblTitle;
  221. private Controls.UCBtnExt btnOK;
  222. private Controls.UCBtnExt btnCancel;
  223. private System.Windows.Forms.Label lblMsg;
  224. private System.Windows.Forms.Panel panel1;
  225. private Controls.UCSplitLine_V ucSplitLine_V1;
  226. private System.Windows.Forms.Panel btnClose;
  227. private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
  228. private Controls.UCSplitLine_H ucSplitLine_H1;
  229. private Controls.UCSplitLine_H ucSplitLine_H2;
  230. }
  231. }

用处及效果

用处:一般用在一个需要用户确定的提示上

效果:

调用示例

  1. if (FrmDialog.ShowDialog(this, "是否再显示一个没有取消按钮的提示框?", "模式窗体测试", true) == System.Windows.Forms.DialogResult.OK)
  2. {
  3. FrmDialog.ShowDialog(this, "这是一个没有取消按钮的提示框", "模式窗体测试");
  4. }

最后的话

如果你喜欢的话,请到 https://gitee.com/kwwwvagaa/net_winform_custom_control 点个星 星吧

(十八)c#Winform自定义控件-提示框的更多相关文章

  1. (三十)c#Winform自定义控件-文本框(三)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  2. (十六)c#Winform自定义控件-文本框哪里去了?-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  3. (八十二)c#Winform自定义控件-穿梭框

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  4. (三十一)c#Winform自定义控件-文本框(四)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  5. (五十)c#Winform自定义控件-滑块

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  6. (二十)c#Winform自定义控件-有后退的窗体

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  7. (二十八)c#Winform自定义控件-文本框(一)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  8. .net开发笔记(十八) winform中的等待框

    winform中很多任务是需要在后台线程(或类似)中完成的,也就是说,经常容易涉及到UI界面与后台工作线程之间的交互.比如UI界面控制后台工作的执行(启动.暂停.停止等),后台工作进度在UI界面上的显 ...

  9. (二十九)c#Winform自定义控件-文本框(二)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

随机推荐

  1. SpringBoot项目构建成jar运行后,如何正确读取resource下的文件

    SpringBoot项目构建成jar运行后,如何正确读取resource下的文件 不管你使用的是SpringBoot 1.x还是SpringBoot2.x,在开Dev环境中使用eclipse.IEAD ...

  2. JavaScript作用域及预编译

    几乎所有的编程语言都可以存储,访问,修改变量,那在JavaScript中这些变量放在那里?程序如何找到他们? js被归类于解释执行语言,但事实上他也是一门编译语言,因为他也要编译,但于传统的编译语言不 ...

  3. spark 源码分析之十八 -- Spark存储体系剖析

    本篇文章主要剖析BlockManager相关的类以及总结Spark底层存储体系. 总述 先看 BlockManager相关类之间的关系如下: 我们从NettyRpcEnv 开始,做一下简单说明. Ne ...

  4. Python -----函数(基础部分)

    函数: 1.定义: 函数是对功能的封装 2.语法: def 函数名 函数体 函数名 函数名的命名规则和变量一样 3.函数的返回值: return,函数执行完毕,不会执行后面的 1.如果函数中不写ret ...

  5. ajax同步与异步 理解

    例如,小明去餐馆排队点餐,前台服务员将小明的菜单告诉厨师进行制作,此时小明后面排队的人就一直等着,直到厨师制作完成,把饭菜送到小明手里后离开,后面的人才能继续点餐:这就是同步处理 但是,如果前台服务员 ...

  6. 《VR入门系列教程》之11---基本几何-材质-光照

    网格.多边形.顶点     绘制3D图形有许多方法,用的最多的是用网格绘制.一个网格由一个或多个多边形组成,这些多边形的顶点都是三维空间中的点,它们具有x.y.z三个坐标值.网格中通常采用三角形和四边 ...

  7. storm入门demo

    一.storm入门demo的介绍 storm的入门helloworld有2种方式,一种是本地的,另一种是远程. 本地实现: 本地写好demo之后,不用搭建storm集群,下载storm的相关jar包即 ...

  8. Hadoop自学系列集(四) ---- Hadoop集群

    久等了,近期公司比较忙,学习的时间都没有啊,到今日才有时间呢!!!好了,下面就跟着笔者开始配置Hadoop集群吧. hosts文件和SSH免密码登录配置好了之后,现在进入Hadoop安装目录,修改一些 ...

  9. java基础知识总结,绝对经典

    写代码: 1,明确需求.我要做什么? 2,分析思路.我要怎么做?1,2,3. 3,确定步骤.每一个思路部分用到哪些语句,方法,和对象. 4,代码实现.用具体的java语言代码把思路体现出来. 学习新技 ...

  10. 关于程序null值的见解

    今天遇到了一个问题,查询一条数据,返回用list接,发现少了2个值(ssh框架).执行SQL少的这两个字段的值为null.上图说明一下: 可以看到第一次查询没有角标38.39的值. 是同一条SQL,第 ...