DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    6

    [HELP] Create and Remove Controls at Run Time

    I saw the article (http://www.freevbcode.com/ShowCode.a...815&NoBox=True) that tells how to create and remove controls at run
    time and it works perfectly but I will like to know how can I use the
    objects created. For example: I create a Textbox with name "Text1",
    but how can I use the data that I will insert in the textbox created
    at run time?

    thanks so much for helping.

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Look at the MSDN page
    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx

    At the bottom, it explains how to add a Command button, basically you have to declare a global variable of type, in your case, TextBox
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Jun 2009
    Posts
    135
    By referencing it in code through the controls collection. You can also write code for its events just as you would if you put a control on your form at design time...



    Good Luck

  4. #4
    Join Date
    Apr 2010
    Posts
    6
    Quote Originally Posted by mstraf View Post
    Look at the MSDN page
    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx

    At the bottom, it explains how to add a Command button, basically you have to declare a global variable of type, in your case, TextBox
    That's it. Works perfectly!

    Thanks to everyone.

Similar Threads

  1. query tuning
    By dhaya in forum Database
    Replies: 11
    Last Post: 08-25-2003, 05:24 PM
  2. How long before the next version??
    By _CAG in forum .NET
    Replies: 146
    Last Post: 08-12-2002, 10:40 PM
  3. Re: App Object (fixes)
    By Rob Teixeira in forum .NET
    Replies: 129
    Last Post: 06-06-2002, 05:23 AM
  4. Replies: 0
    Last Post: 12-30-2000, 06:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links