Click here to Skip to main content
15,909,437 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Upgrading vb.net 2002 to vb.net 2005 Pin
Luc Pattyn31-Oct-07 2:03
sitebuilderLuc Pattyn31-Oct-07 2:03 
QuestionInsert Code tag in the webbrowser control Pin
Luay.Essa29-Oct-07 21:14
Luay.Essa29-Oct-07 21:14 
QuestionLoading a User Control onto a panel at runtime Pin
Henry Venn28-Oct-07 1:49
Henry Venn28-Oct-07 1:49 
AnswerRe: Loading a User Control onto a panel at runtime Pin
TJoe28-Oct-07 6:52
TJoe28-Oct-07 6:52 
QuestionRe: Loading a User Control onto a panel at runtime Pin
Henry Venn28-Oct-07 15:56
Henry Venn28-Oct-07 15:56 
AnswerRe: Loading a User Control onto a panel at runtime Pin
TJoe29-Oct-07 2:14
TJoe29-Oct-07 2:14 
GeneralRe: Loading a User Control onto a panel at runtime Pin
Henry Venn30-Oct-07 0:58
Henry Venn30-Oct-07 0:58 
GeneralRe: Loading a User Control onto a panel at runtime Pin
TJoe30-Oct-07 2:01
TJoe30-Oct-07 2:01 
You may need to add the user control to the panel first then update it's Location/Size. If I create a Form in Visual Studio with a Panel that contains a single text box then the designer code loooks like this:

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
    this.panel1 = new System.Windows.Forms.Panel();
    this.textBox1 = new System.Windows.Forms.TextBox();
    this.panel1.SuspendLayout();
    this.SuspendLayout();
    // 
    // panel1
    // 
    this.panel1.Controls.Add(this.textBox1);
    this.panel1.Location = new System.Drawing.Point(39, 58);
    this.panel1.Name = "panel1";
    this.panel1.Size = new System.Drawing.Size(200, 100);
    this.panel1.TabIndex = 0;
    // 
    // textBox1
    // 
    this.textBox1.Location = new System.Drawing.Point(35, 37);
    this.textBox1.Name = "textBox1";
    this.textBox1.Size = new System.Drawing.Size(100, 20);
    this.textBox1.TabIndex = 0;
    // 
    // Form1
    // 
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    this.ClientSize = new System.Drawing.Size(292, 266);
    this.Controls.Add(this.panel1);
    this.Name = "Form1";
    this.Text = "Form1";
    this.panel1.ResumeLayout(false);
    this.panel1.PerformLayout();
    this.ResumeLayout(false);

}


As you can see the TextBox is added to the panel before it's properties are set. Also, make sure to assign a name to your user control. I can't remember off the top of my head, but there are some problems if you don't.

Assuming this doesn't help, if you can put together a small sample project and email it over then I'll be able to figure out the problem a lot quicker.

Take care,
Tom

-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com

QuestionRe: Loading a User Control onto a panel at runtime Pin
Henry Venn31-Oct-07 17:18
Henry Venn31-Oct-07 17:18 
AnswerRe: Loading a User Control onto a panel at runtime Pin
Henry Venn31-Oct-07 17:35
Henry Venn31-Oct-07 17:35 
QuestionEmbedding an Access table into datagrid Pin
latuan13227-Oct-07 21:53
latuan13227-Oct-07 21:53 
AnswerRe: Embedding an Access table into datagrid Pin
Paul Conrad28-Oct-07 6:33
professionalPaul Conrad28-Oct-07 6:33 
GeneralHorizontally Scroll Lines of Text Pin
Brady Kelly27-Oct-07 1:40
Brady Kelly27-Oct-07 1:40 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn28-Oct-07 7:08
sitebuilderLuc Pattyn28-Oct-07 7:08 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 3:21
Brady Kelly29-Oct-07 3:21 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn29-Oct-07 3:27
sitebuilderLuc Pattyn29-Oct-07 3:27 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 4:02
Brady Kelly29-Oct-07 4:02 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn29-Oct-07 4:31
sitebuilderLuc Pattyn29-Oct-07 4:31 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 4:39
Brady Kelly29-Oct-07 4:39 
QuestionAccessing multiple groups of radiobuttons Pin
Steve Landers26-Oct-07 13:25
Steve Landers26-Oct-07 13:25 
AnswerRe: Accessing multiple groups of radiobuttons Pin
Luc Pattyn26-Oct-07 14:15
sitebuilderLuc Pattyn26-Oct-07 14:15 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Steve Landers27-Oct-07 10:08
Steve Landers27-Oct-07 10:08 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Luc Pattyn27-Oct-07 13:25
sitebuilderLuc Pattyn27-Oct-07 13:25 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Steve Landers27-Oct-07 13:56
Steve Landers27-Oct-07 13:56 
QuestionHow to display char & integer type variables toether in a list box Pin
nuweima25-Oct-07 19:56
nuweima25-Oct-07 19:56 

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.