Click here to Skip to main content
16,020,811 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 29-Jun-09 2:47
professional dan!sh 29-Jun-09 2:47 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
BillWoodruff29-Jun-09 3:38
professionalBillWoodruff29-Jun-09 3:38 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 29-Jun-09 6:51
professional dan!sh 29-Jun-09 6:51 
AnswerRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute29-Jun-09 6:23
Henry Minute29-Jun-09 6:23 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk29-Jun-09 19:01
honey.rpk29-Jun-09 19:01 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute29-Jun-09 23:29
Henry Minute29-Jun-09 23:29 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk29-Jun-09 23:57
honey.rpk29-Jun-09 23:57 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 0:34
Henry Minute30-Jun-09 0:34 
I have just created the simplest control that I could think of. It allows me to drop controls on to it, dock them etc. etc. etc.....

Here is the code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace ExplorerBarLibrary
{
	[
	Designer(typeof(ParentControlDesigner))
	]
	public partial class TestControl : UserControl
	{
		public TestControl()
		{
			InitializeComponent();
		}
	}
}


and the *.Designer.cs file
namespace ExplorerBarLibrary
{
	partial class TestControl
	{
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Component Designer generated code

		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.SuspendLayout();
			// 
			// TestControl
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.Name = "TestControl";
			this.Size = new System.Drawing.Size(148, 148);
			this.ResumeLayout(false);

		}

		#endregion
	}
}


If that doesn't work for you, then there is something wrong with your system is all I can think. Confused | :confused:

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 0:58
honey.rpk30-Jun-09 0:58 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 1:08
Henry Minute30-Jun-09 1:08 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 1:22
Henry Minute30-Jun-09 1:22 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 2:30
honey.rpk30-Jun-09 2:30 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 5:51
Henry Minute30-Jun-09 5:51 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
ice.cool 172930-Jun-09 20:23
ice.cool 172930-Jun-09 20:23 
GeneralRe: How to make a control as a child to user control but not for a form? [modified] Pin
Henry Minute30-Jun-09 6:26
Henry Minute30-Jun-09 6:26 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 30-Jun-09 6:39
professional dan!sh 30-Jun-09 6:39 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 8:20
Henry Minute30-Jun-09 8:20 
Generalattn. Henry : small suggestion : Re: How to make a control as a child to user control but not for a form? [modified] Pin
BillWoodruff30-Jun-09 19:11
professionalBillWoodruff30-Jun-09 19:11 
GeneralRe: attn. Henry : small suggestion : Re: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 22:57
Henry Minute30-Jun-09 22:57 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
BillWoodruff30-Jun-09 9:07
professionalBillWoodruff30-Jun-09 9:07 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 18:55
honey.rpk30-Jun-09 18:55 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 19:46
honey.rpk30-Jun-09 19:46 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 22:48
Henry Minute30-Jun-09 22:48 
General[Message Deleted] Pin
ice.cool 17291-Jul-09 0:00
ice.cool 17291-Jul-09 0:00 
GeneralRe: Thanks for solution Pin
Henry Minute1-Jul-09 0:20
Henry Minute1-Jul-09 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.