PDA

View Full Version : VB & Clone object


Sirber
13th February 2004, 01:44
Hi

I have a frame named "frmRealAnime", and I'd like to clone it, like a clean copy of the object in another object.

Dim frmTemp As frmMain

Set frmTemp = frmRealAnime...only create a pointer of frmRealAnime.

Any idea?

Sirber
13th February 2004, 03:01
The only way to clone an object is to serialize it first. The only code that can do that is (and that works):

http://www.vb-helper.com/howto_vb6_serialize.html

PropertyBag don't work, as well as some DLLs.

I've read somewhere VB use reference for objects to save memory... how lame... :devil:

Sirber
13th February 2004, 04:13
grrrrr

This is all crap! Goign to use INI interface to save / load settings :devil: