placing user controls in a form...

This is a discussion on placing user controls in a form... within the C# Programming forums, part of the General Programming Boards category; I created a user control and want to add it in a form using: Code: this.Controls.Add(attachmentControl); attachmentControl.Visible = true; But ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    141

    placing user controls in a form...

    I created a user control and want to add it in a form using:
    Code:
      this.Controls.Add(attachmentControl);
      attachmentControl.Visible = true;
    But the next time I wish to add another one I find that its added "behind" the older one.Are there any commands to place these controls serially (i.e. one below the other) ?

  2. #2
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,236
    Why you don't use form designer. Want to code it by yourself?
    I don't know C# but take a look at this
    Code:
    this.comboBox1.AllowDrop = true;
    this.comboBox1.FormattingEnabled = true;
    this.comboBox1.Location = System.Drawing.Point(62, 59); //Look at this
    this.comboBox1.Name =  "comboBox1";
    this.comboBox1.Size = System.Drawing.Size(121, 21);
    this.comboBox1.TabIndex = 0;
    Thanks GanglyLamb
    Last edited by siavoshkc; 07-21-2006 at 05:08 PM.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  3. #3
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    >>I converted -> to . but I don't know what to do with ::.

    The same, it becomes a .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to limit user input to a certain number of digits?
    By NewbGuy in forum C Programming
    Replies: 7
    Last Post: 05-08-2009, 10:57 PM
  2. timed user input
    By sainiabhishek in forum C Programming
    Replies: 4
    Last Post: 04-01-2009, 12:59 PM
  3. Getting the loop control form the user
    By Extropian in forum C Programming
    Replies: 6
    Last Post: 08-11-2005, 10:50 AM
  4. Making an MFC form to suit
    By TJJ in forum Windows Programming
    Replies: 1
    Last Post: 04-17-2004, 12:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21