Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2004, 05:51 PM
Authorized User
 
Join Date: Mar 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do you create an object?

I can create object like adodb.connection and things of the sort, but what I do have the hardest time trying to find, is how to create a visual object during runtime.

Say that the program starts, the only thing that is present is the form with nothing but a button. When you click that button a text box is created, but it was not there to begin with (it was not hiding, or invisible) it didnt exist.

Is there any possible way to create object like that during runtime?

 
Old March 10th, 2004, 05:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there are two ways.
First, create a design time an object with index 0, make it invisible and at run time use Load to create any object after the first, for example Load MyTextBox(1)
Second, use the Controls.Add method

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
"Automation server can not create object" nagarajan123 Apache Tomcat 2 April 30th, 2008 08:27 AM
ActiveX Component can't create an object lihar Access VBA 1 December 20th, 2006 07:52 AM
ActiveX component can't create object lameneural Classic ASP Components 0 July 4th, 2006 12:14 AM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 06:51 AM
How do i create an instance of an active x object RDosch Classic ASP Basics 1 July 9th, 2003 06:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.