摘要:
代码如下: 1 Public Class NumericTextBox 2 Inherits System.Windows.Forms.TextBox 3 4 #Region " Windows Form Designer generated code " 5 6 Public Sub New() 7 MyBase.New() 8 9 'This call is required by the Windows Form Designer.10 InitializeComponent()11 12 'Add any initialization af... 阅读全文
摘要:
VB.NET设计旋转文本控件代码如下: 1 Public Class TextRotator 2 Inherits System.Windows.Forms.Control 3 4 Private msngRotationAngle As Single = 0 5 6 Public Property RotationAngle() As Single 7 Get 8 Return msngRotationAngle 9 End Get10 Set(ByVal Value As Single)11 If (msngRotationA... 阅读全文
摘要:
使用VB.NET开发复合控件界面:控件类型名称 文本ListBox lstSourceListBox lstTargegButton btnAddAdd >Button btnAddAllAdd All >>Button btnRemove < RemoveButton btnClear << Clear代码如下: 1 Public Class SelectCombo 2 Inherits System.Windows.Forms.UserControl 3 4 ' Make the width of the area for the buttons 阅读全文
摘要:
带下划线的LABEL控件继承自Label,代码如下: 1 using System.Drawing.Drawing2D; 2 using System.Windows.Forms; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Linq; 6 using System.Text; 7 8 namespace CustomControlSample 9 { 10 public class LineLabel:System.Windows.Forms.L... 阅读全文
摘要:
C#读写ini文件之前要了解的概念:INI就是扩展名为"INI"的文件,其实他本身是个文本文件,可以用记事本打开,主要存放的是用户所做的选择或系统的各种参数.C#读写ini文件其实并不是普通的文本文件.它有自己的结构.由若干段落(SECTION)组成,在每个带括号的标题下面,是若干个以单个单词开头的关键字(KEYWORD)和一个等号,等号右边就是关键字的值(VALUE).例如:[Section1] KeyWord1=Value1 KeyWord2=Value2 ... [Section2] KeyWord3=Value3 KeyWord4=Value4C#读写ini文件最初 阅读全文