C# ISupportInitialize的使用
来源:互联网 发布:android http网络协议 编辑:程序博客网 时间:2024/06/10 03:12
System.ComponentModel.ISupportInitialize的BeginInitI()和EndInit()
摘自MSDN:Visual Studio .NET 設計環境使用這個方法,來開始進行用於表單或為另一個元件所使用之元件的初始化。EndInit 方法會結束初始化。
使用 BeginInit 和 EndInit 方法,防止控制項在完全初始化之前被使用。
事例:
private void InitializeComponent() { this.qqGlassButton1 = new ControlExs.QQGlassButton(); ((System.ComponentModel.ISupportInitialize)(this.qqGlassButton1)).BeginInit(); this.SuspendLayout(); // // qqGlassButton1 // this.qqGlassButton1.BackColor = System.Drawing.Color.Transparent; this.qqGlassButton1.DialogResult = System.Windows.Forms.DialogResult.None; this.qqGlassButton1.Font = new System.Drawing.Font("Microsoft YaHei", 9F); this.qqGlassButton1.Location = new System.Drawing.Point(0, 0); this.qqGlassButton1.Name = "qqGlassButton1"; this.qqGlassButton1.Size = new System.Drawing.Size(75, 23); this.qqGlassButton1.TabIndex = 0; this.qqGlassButton1.TabStop = false; this.qqGlassButton1.Text = "qqGlassButton1"; this.qqGlassButton1.ToolTipText = null; ((System.ComponentModel.ISupportInitialize)(this.qqGlassButton1)).EndInit(); this.ResumeLayout(false); } }}
https://social.msdn.microsoft.com/Forums/exchange/zh-CN/f56d7563-b704-4c27-8429-384ccc28d17a/systemcomponentmodelisupportinitializebegininitiendinit
0 0
- C# ISupportInitialize的使用
- System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”失败
- 【Winform】 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”。
- C#字符串的使用
- 使用C#的属性
- 使用C#的BitmapData
- C# 类的使用
- 使用C#的BitmapData
- C#定时器的使用
- C#全局变量的使用
- C#中多態的使用
- C#定时器的使用
- c#委托的使用
- C#全局变量的使用
- C# 信号量的使用
- C#进度条的使用
- C#随机数的使用
- c# SortedList的使用
- Android自定义控件——侧滑菜单(待完善)
- C语言-Switch 和case 的使用注意事项以及穿透效果的使用
- arm linux源代码分析第1讲-arm linux源代码分析的主要结构
- 弹出框返回值设定(浏览器兼容)
- 欢迎使用CSDN-markdown编辑器
- C# ISupportInitialize的使用
- 欢迎使用CSDN-markdown编辑器
- C#中out和ref之间的区别
- hdu 5370 Tree Maker(catalan+dp)
- Command模式
- yield() sleep()wait()区别
- 第84讲:Scala中List和ListBuffer设计实现思考学习笔记
- Leetcode63 Unique Paths II
- internal 修饰符起什么作用?