Exemplo n.º 1
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WinForm));
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.axSubClass1 = new AxASTC.AxSubClass();
			this.ButLUnSubClass = new System.Windows.Forms.Button();
			this.ButLSubClass = new System.Windows.Forms.Button();
			this.Label3 = new System.Windows.Forms.Label();
			this.ListBox1 = new System.Windows.Forms.ListBox();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.ContextMenu1 = new System.Windows.Forms.ContextMenu();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.TextBox1 = new System.Windows.Forms.TextBox();
			this.axSubClass2 = new AxASTC.AxSubClass();
			this.ButUnSubCont = new System.Windows.Forms.Button();
			this.ButSubContext = new System.Windows.Forms.Button();
			this.Label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.axSubClass3 = new AxASTC.AxSubClass();
			this.butUnSubF = new System.Windows.Forms.Button();
			this.butFSubClass = new System.Windows.Forms.Button();
			this.label7 = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.axSubClass1)).BeginInit();
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.axSubClass2)).BeginInit();
			this.groupBox3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.axSubClass3)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.axSubClass1);
			this.groupBox1.Controls.Add(this.ButLUnSubClass);
			this.groupBox1.Controls.Add(this.ButLSubClass);
			this.groupBox1.Controls.Add(this.Label3);
			this.groupBox1.Controls.Add(this.ListBox1);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Location = new System.Drawing.Point(8, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(280, 240);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			// 
			// axSubClass1
			// 
			this.axSubClass1.ContainingControl = this;
			this.axSubClass1.Enabled = true;
			this.axSubClass1.Location = new System.Drawing.Point(240, 192);
			this.axSubClass1.Name = "axSubClass1";
			this.axSubClass1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSubClass1.OcxState")));
			this.axSubClass1.Size = new System.Drawing.Size(36, 36);
			this.axSubClass1.TabIndex = 6;
			this.axSubClass1.MessageReceived += new AxASTC.__SubClass_MessageReceivedEventHandler(this.axSubClass1_MessageReceived);
			// 
			// ButLUnSubClass
			// 
			this.ButLUnSubClass.Location = new System.Drawing.Point(144, 208);
			this.ButLUnSubClass.Name = "ButLUnSubClass";
			this.ButLUnSubClass.Size = new System.Drawing.Size(80, 24);
			this.ButLUnSubClass.TabIndex = 5;
			this.ButLUnSubClass.Text = "UnSubClass";
			this.ButLUnSubClass.Click += new System.EventHandler(this.ButLUnSubClass_Click);
			// 
			// ButLSubClass
			// 
			this.ButLSubClass.Location = new System.Drawing.Point(56, 208);
			this.ButLSubClass.Name = "ButLSubClass";
			this.ButLSubClass.Size = new System.Drawing.Size(80, 24);
			this.ButLSubClass.TabIndex = 4;
			this.ButLSubClass.Text = "SubClass";
			this.ButLSubClass.Click += new System.EventHandler(this.ButLSubClass_Click);
			// 
			// Label3
			// 
			this.Label3.ForeColor = System.Drawing.Color.Red;
			this.Label3.Location = new System.Drawing.Point(8, 176);
			this.Label3.Name = "Label3";
			this.Label3.Size = new System.Drawing.Size(264, 24);
			this.Label3.TabIndex = 3;
			this.Label3.Text = "Then click SubClass command and Right Click any item and you will " +  
				"see the difference.";
			// 
			// ListBox1
			// 
			this.ListBox1.Items.AddRange(new object[] {
						"item0",
						"item1",
						"item2",
						"item3"});
			this.ListBox1.Location = new System.Drawing.Point(8, 104);
			this.ListBox1.Name = "ListBox1";
			this.ListBox1.Size = new System.Drawing.Size(264, 69);
			this.ListBox1.TabIndex = 2;
			// 
			// label2
			// 
			this.label2.ForeColor = System.Drawing.Color.Red;
			this.label2.Location = new System.Drawing.Point(8, 72);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(264, 32);
			this.label2.TabIndex = 1;
			this.label2.Text = "Right Click any item in listbox before you click the Subclass comm" +  
				"and button.";
			// 
			// label1
			// 
			this.label1.ForeColor = System.Drawing.Color.Blue;
			this.label1.Location = new System.Drawing.Point(8, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(264, 56);
			this.label1.TabIndex = 0;
			this.label1.Text = "In the Normal ListBox you can\'t assign a popup menu to any item so" +  
				" when the user right click the item it will appears              " +  
				"                                      But if you we use Subclassi" +  
				"ng we can achieve this.";
			// 
			// ContextMenu1
			// 
			this.ContextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
						this.menuItem1});
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 0;
			this.menuItem1.Text = "Click Me";
			this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.TextBox1);
			this.groupBox2.Controls.Add(this.axSubClass2);
			this.groupBox2.Controls.Add(this.ButUnSubCont);
			this.groupBox2.Controls.Add(this.ButSubContext);
			this.groupBox2.Controls.Add(this.Label5);
			this.groupBox2.Controls.Add(this.label6);
			this.groupBox2.Location = new System.Drawing.Point(8, 256);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(280, 184);
			this.groupBox2.TabIndex = 1;
			this.groupBox2.TabStop = false;
			// 
			// TextBox1
			// 
			this.TextBox1.Location = new System.Drawing.Point(8, 56);
			this.TextBox1.Multiline = true;
			this.TextBox1.Name = "TextBox1";
			this.TextBox1.Size = new System.Drawing.Size(248, 40);
			this.TextBox1.TabIndex = 7;
			this.TextBox1.Text = "Right Click me before and after you click Subclass command  button" +  
				" and watch the difference.";
			// 
			// axSubClass2
			// 
			this.axSubClass2.ContainingControl = this;
			this.axSubClass2.Enabled = true;
			this.axSubClass2.Location = new System.Drawing.Point(240, 136);
			this.axSubClass2.Name = "axSubClass2";
			this.axSubClass2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSubClass2.OcxState")));
			this.axSubClass2.Size = new System.Drawing.Size(36, 36);
			this.axSubClass2.TabIndex = 6;
			this.axSubClass2.Visible = false;
			this.axSubClass2.MessageReceived += new AxASTC.__SubClass_MessageReceivedEventHandler(this.axSubClass2_MessageReceived);
			// 
			// ButUnSubCont
			// 
			this.ButUnSubCont.Location = new System.Drawing.Point(144, 152);
			this.ButUnSubCont.Name = "ButUnSubCont";
			this.ButUnSubCont.Size = new System.Drawing.Size(80, 24);
			this.ButUnSubCont.TabIndex = 5;
			this.ButUnSubCont.Text = "UnSubClass";
			this.ButUnSubCont.Click += new System.EventHandler(this.ButUnSubCont_Click);
			// 
			// ButSubContext
			// 
			this.ButSubContext.Location = new System.Drawing.Point(56, 152);
			this.ButSubContext.Name = "ButSubContext";
			this.ButSubContext.Size = new System.Drawing.Size(80, 24);
			this.ButSubContext.TabIndex = 4;
			this.ButSubContext.Text = "SubClass";
			this.ButSubContext.Click += new System.EventHandler(this.ButSubContext_Click);
			// 
			// Label5
			// 
			this.Label5.BackColor = System.Drawing.Color.White;
			this.Label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.Label5.ForeColor = System.Drawing.Color.Red;
			this.Label5.Location = new System.Drawing.Point(8, 104);
			this.Label5.Name = "Label5";
			this.Label5.Size = new System.Drawing.Size(248, 32);
			this.Label5.TabIndex = 3;
			// 
			// label6
			// 
			this.label6.ForeColor = System.Drawing.Color.Blue;
			this.label6.Location = new System.Drawing.Point(8, 16);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(264, 40);
			this.label6.TabIndex = 0;
			this.label6.Text = "You can use Subclassing to disable the Textbox context menu in whi" +  
				"ch it appears when the user right click the Text box.";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.axSubClass3);
			this.groupBox3.Controls.Add(this.butUnSubF);
			this.groupBox3.Controls.Add(this.butFSubClass);
			this.groupBox3.Controls.Add(this.label7);
			this.groupBox3.Location = new System.Drawing.Point(8, 448);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(280, 88);
			this.groupBox3.TabIndex = 2;
			this.groupBox3.TabStop = false;
			// 
			// axSubClass3
			// 
			this.axSubClass3.ContainingControl = this;
			this.axSubClass3.Enabled = true;
			this.axSubClass3.Location = new System.Drawing.Point(240, 40);
			this.axSubClass3.Name = "axSubClass3";
			this.axSubClass3.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSubClass3.OcxState")));
			this.axSubClass3.Size = new System.Drawing.Size(36, 36);
			this.axSubClass3.TabIndex = 6;
			this.axSubClass3.Visible = false;
			this.axSubClass3.MessageReceived += new AxASTC.__SubClass_MessageReceivedEventHandler(this.axSubClass3_MessageReceived);
			// 
			// butUnSubF
			// 
			this.butUnSubF.Location = new System.Drawing.Point(144, 56);
			this.butUnSubF.Name = "butUnSubF";
			this.butUnSubF.Size = new System.Drawing.Size(80, 24);
			this.butUnSubF.TabIndex = 5;
			this.butUnSubF.Text = "UnSubClass";
			this.butUnSubF.Click += new System.EventHandler(this.butUnSubF_Click);
			// 
			// butFSubClass
			// 
			this.butFSubClass.Location = new System.Drawing.Point(56, 56);
			this.butFSubClass.Name = "butFSubClass";
			this.butFSubClass.Size = new System.Drawing.Size(80, 24);
			this.butFSubClass.TabIndex = 4;
			this.butFSubClass.Text = "SubClass";
			this.butFSubClass.Click += new System.EventHandler(this.butFSubClass_Click);
			// 
			// label7
			// 
			this.label7.ForeColor = System.Drawing.Color.Blue;
			this.label7.Location = new System.Drawing.Point(8, 16);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(264, 40);
			this.label7.TabIndex = 0;
			this.label7.Text = "Try to resize this Form before and after you click the subclass Fo" +  
				"rm command buttton and watch the difference.";
			// 
			// WinForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(296, 542);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Name = "WinForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "C#Builder SubClass Sample";
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.axSubClass1)).EndInit();
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.axSubClass2)).EndInit();
			this.groupBox3.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.axSubClass3)).EndInit();
			this.ResumeLayout(false);
		}
Exemplo n.º 2
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			this.GroupBox1 = new System.Windows.Forms.GroupBox();
			this.Label3 = new System.Windows.Forms.Label();
			this.ListBox1 = new System.Windows.Forms.ListBox();
			this.Label2 = new System.Windows.Forms.Label();
			this.Label1 = new System.Windows.Forms.Label();
			this.ButLUnSubClass = new System.Windows.Forms.Button();
			this.ButLSubClass = new System.Windows.Forms.Button();
			this.SubClass1 = new AxASTC.AxSubClass();
			this.Balloon1 = new AxASTC.AxBalloon();
			this.Balloon2 = new AxASTC.AxBalloon();
			this.GroupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.SubClass1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.Balloon1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.Balloon2)).BeginInit();
			this.SuspendLayout();
			// 
			// GroupBox1
			// 
			this.GroupBox1.Controls.Add(this.Balloon2);
			this.GroupBox1.Controls.Add(this.Balloon1);
			this.GroupBox1.Controls.Add(this.SubClass1);
			this.GroupBox1.Controls.Add(this.Label3);
			this.GroupBox1.Controls.Add(this.ListBox1);
			this.GroupBox1.Controls.Add(this.Label2);
			this.GroupBox1.Controls.Add(this.Label1);
			this.GroupBox1.Controls.Add(this.ButLUnSubClass);
			this.GroupBox1.Controls.Add(this.ButLSubClass);
			this.GroupBox1.ForeColor = System.Drawing.Color.Blue;
			this.GroupBox1.Location = new System.Drawing.Point(8, 8);
			this.GroupBox1.Name = "GroupBox1";
			this.GroupBox1.Size = new System.Drawing.Size(408, 232);
			this.GroupBox1.TabIndex = 1;
			this.GroupBox1.TabStop = false;
			this.GroupBox1.MouseHover += new System.EventHandler(this.GroupBox1_MouseHover);
			// 
			// Label3
			// 
			this.Label3.ForeColor = System.Drawing.Color.Red;
			this.Label3.Location = new System.Drawing.Point(40, 160);
			this.Label3.Name = "Label3";
			this.Label3.Size = new System.Drawing.Size(256, 32);
			this.Label3.TabIndex = 5;
			// 
			// ListBox1
			// 
			this.ListBox1.Items.AddRange(new object[] {
														  "item0",
														  "item1",
														  "item2",
														  "item3"});
			this.ListBox1.Location = new System.Drawing.Point(40, 96);
			this.ListBox1.Name = "ListBox1";
			this.ListBox1.Size = new System.Drawing.Size(320, 56);
			this.ListBox1.TabIndex = 4;
			// 
			// Label2
			// 
			this.Label2.ForeColor = System.Drawing.Color.Red;
			this.Label2.Location = new System.Drawing.Point(40, 64);
			this.Label2.Name = "Label2";
			this.Label2.Size = new System.Drawing.Size(320, 32);
			this.Label2.TabIndex = 3;
			this.Label2.Text = "Move the Cursor between listBox items before and after you click SubClass command" +
				" Button and watch the difference.";
			// 
			// Label1
			// 
			this.Label1.ForeColor = System.Drawing.Color.Blue;
			this.Label1.Location = new System.Drawing.Point(8, 16);
			this.Label1.Name = "Label1";
			this.Label1.Size = new System.Drawing.Size(392, 40);
			this.Label1.TabIndex = 2;
			this.Label1.Text = "ListBox control doesn\'t provides a mousemove event in which you can use for displ" +
				"aying a balloon tooltip for the list Box, but if you we subclass the listbox we " +
				"can assign a Balloon tooltip for every item in the listbox.";
			// 
			// ButLUnSubClass
			// 
			this.ButLUnSubClass.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(64)));
			this.ButLUnSubClass.Location = new System.Drawing.Point(208, 200);
			this.ButLUnSubClass.Name = "ButLUnSubClass";
			this.ButLUnSubClass.TabIndex = 2;
			this.ButLUnSubClass.Text = "UnSubClass";
			this.ButLUnSubClass.Click += new System.EventHandler(this.ButLUnSubClass_Click);
			// 
			// ButLSubClass
			// 
			this.ButLSubClass.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(64)));
			this.ButLSubClass.Location = new System.Drawing.Point(128, 200);
			this.ButLSubClass.Name = "ButLSubClass";
			this.ButLSubClass.TabIndex = 1;
			this.ButLSubClass.Text = "SubClass";
			this.ButLSubClass.Click += new System.EventHandler(this.ButLSubClass_Click);
			// 
			// SubClass1
			// 
			this.SubClass1.ContainingControl = this;
			this.SubClass1.Enabled = true;
			this.SubClass1.Location = new System.Drawing.Point(8, 192);
			this.SubClass1.Name = "SubClass1";
			this.SubClass1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("SubClass1.OcxState")));
			this.SubClass1.Size = new System.Drawing.Size(36, 36);
			this.SubClass1.TabIndex = 6;
			this.SubClass1.MessageReceived += new AxASTC.__SubClass_MessageReceivedEventHandler(this.axSubClass1_MessageReceived);
			// 
			// Balloon1
			// 
			this.Balloon1.ContainingControl = this;
			this.Balloon1.Enabled = true;
			this.Balloon1.Location = new System.Drawing.Point(376, 168);
			this.Balloon1.Name = "Balloon1";
			this.Balloon1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Balloon1.OcxState")));
			this.Balloon1.Size = new System.Drawing.Size(27, 27);
			this.Balloon1.TabIndex = 7;
			// 
			// Balloon2
			// 
			this.Balloon2.ContainingControl = this;
			this.Balloon2.Enabled = true;
			this.Balloon2.Location = new System.Drawing.Point(376, 200);
			this.Balloon2.Name = "Balloon2";
			this.Balloon2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Balloon2.OcxState")));
			this.Balloon2.Size = new System.Drawing.Size(27, 27);
			this.Balloon2.TabIndex = 8;
			this.Balloon2.BalloonLeftClick += new System.EventHandler(this.Balloon2_BalloonLeftClick);
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(424, 246);
			this.Controls.Add(this.GroupBox1);
			this.Name = "Form1";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "VC#.NET SubClass";
			this.GroupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.SubClass1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.Balloon1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.Balloon2)).EndInit();
			this.ResumeLayout(false);

		}