-
June 1st, 2001, 02:43 PM
#1
Copying objects
When I use
set newobject = oldobject
the newobject will change when the oldobject changing. How do I do this but just copy the object.
Thank you
-
June 1st, 2001, 03:09 PM
#2
Re: Copying objects
What kind of object? picturebox,text,etc.
--Ant
------------------------------------------------------------------------------------------------------------------------
Want Free Software?
E-mail me at: cgeorge@thevortex.com
-
June 1st, 2001, 03:18 PM
#3
Re: Copying objects
the object is declared like this
Dim newobject as Object
Later is set like:
set newObject = Mapobject2.valuemaprenderer
Thank you for any help
-
June 7th, 2001, 07:27 AM
#4
Re: Copying objects
you may use collections:
'did not tested full, so do not know if this will help
'to "just copy the object" you should use
'set myobj= new oldobj
'or
'load theobject
'but if you cannot use New or Load...
dim mycoll as collection
'....
set mycoll = new collection
mycoll.add yourOldobject,"obj1"
mycoll.add youroldObjasSecondobj, "obj2"
....
mycoll("obj1").move 100,100
mycoll("obj2").move 2000,2000
'....
'when finished:
set mycoll= nothing
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
June 7th, 2001, 08:12 AM
#5
Re: Copying objects
The type of object doesn't matter anyway. When using the set command, you actually copie the refference to the object, which always points to the same object in memory.
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|