Dynamicaly add controls

How do I control the location of Dynamicaly add controls?  
LVL 1
HLRosenbergerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonMiddle School Assistant TeacherCommented:
Set the Location() property?...

    Dim btn As New Button
    bnt.Location = New Point(x, y)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HLRosenbergerAuthor Commented:
I've read about setting the location that property in other article.

I'm doing:

dim lbl as New Label

And my lbl does not have a location property.  I don't get it..
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
Label certainly does have a Location() property.  =)

Can you show us  more code?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

HLRosenbergerAuthor Commented:
I believe you.  I just do not know what's going on.  I tried a button, and textbox, and neither have location property.

here's my actual code:

Dim lbl As New Label
lbl.Text ="This is a label"
lbl.Visible = True
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
What kind of project did you start with?

Where is this code being placed?
0
Jacques Bourgeois (James Burger)PresidentCommented:
If you do not have a Location property, you are probably working on a Web application. You should note so and your question, and add ASP.NET in your zones selection.
0
HLRosenbergerAuthor Commented:
Yes, this is WEB application
0
HLRosenbergerAuthor Commented:
Thanks
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
Lol...that would explain it.  Good call JamesBurger!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.