Creating Objects at Runtime 
Author Message
 Creating Objects at Runtime

I need to create an object at runtime. How can I do that?

- Anders Feder



Fri, 13 Sep 2002 03:00:00 GMT  
 Creating Objects at Runtime

Quote:

> I need to create an object at runtime. How can I do that?

> - Anders Feder

depends on the kind of object:
1- Instance of a class:
Project - add class - write code into it (for example 'myfunction')
create the object: dim myobj as new myclass
acess the functions(methods): myobj.myfunction...

2- automation object:
(look for 'createobject' in the online-help to create instances of
automation servers (like word, or outlook)

3- create controls at runtime:
- you cant create totally new controls at runtime, only 'clone' the
existing ones, and edit them, if they are part of an object-array. do
the following:
- create a new form
- put a control on if (for example a textbox)
- set the textboxs index-property to '0'
- write code lik this:
load text1(1)
text1(1).move 100,100
text1(1).visible = true

i hope thats it. if it isnt (this is possible, becouse i havnt my ide
 with me) write again.

Sent via Deja.com http://www.deja.com/
Before you buy.



Fri, 13 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating objects at runtime

2. Creating objects in runtime using the mouse??

3. Create Object at Runtime Help

4. Newbie Q: Creating objects at runtime

5. creating objects at runtime in VB 5.0

6. Creating object during RunTime with Visual Basic 5.0 CCE

7. Create Object At RunTime (Error) adding news propertys dinamically

8. How to create object at runtime ?

9. Creating Objects Durring RunTime

10. Creating Object at Runtime - Not Form

11. Creating Objects Durring RunTime

12. Why Can't I Figure This Out - Creating Objects During Runtime

 

 
Powered by phpBB® Forum Software