⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.cs

📁 java基础方面的一些实例代码
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace mcaoWinAppAdvance
{
	/// <summary>
	/// Form2 的摘要说明。
	/// </summary>
	public class Form2 : System.Windows.Forms.Form
	{
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		private UserControl1 myUserdefinedControl;

		public Form2()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			// 
			// Form2
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(292, 273);
			this.Name = "Form2";
			this.Text = "测试用户自定义控件的使用";
			this.Load += new System.EventHandler(this.Form2_Load);

			this.myUserdefinedControl = new UserControl1( );

			this.myUserdefinedControl.Location = new System.Drawing.Point(12, 20);
			this.myUserdefinedControl.Name = "UserControl1";
			this.myUserdefinedControl.TabIndex = 0;
			this.myUserdefinedControl.Text = "MyUserdefinedControl";

			this.Controls.Add(this.myUserdefinedControl);

		}
		#endregion

		private void Form2_Load(object sender, System.EventArgs e)
		{
			//创建显示用户自定义的控件
			//this.myUserdefinedControl = new UserControl1();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -