C# layout & runtime adding of controls

Posted on 2012-09-12
Last Modified: 2012-09-12
Hi Experts,

I'm setting the location of controls at runtime in c#- but when I add them to the form- they are adding to some sort of default table layout and each control goes into its own column.  I need the absolute coordinates I'm giving to my controls to be used- not this table layout.  Is there a way to use some absolute coordinate layout manager?

Question by:thready
    LVL 25

    Accepted Solution

    If you are adding the controls to the Form's Controls collection, there should't be any problem to use absolute coordinates. Anyway, look if the Dock or Anchor property of the controls are the cause of your problem.
    LVL 1

    Author Closing Comment

    Yep- I was getting my control's right side position before adding it to the form- getting incorrect results..  d-oh!  :)


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now