|
-
September 22nd, 2009, 11:06 AM
#6
Re: Destroying objects that was builded in project-mode
Objects which are created at design-time cannot be destroyed at runtime. However, if you create an array, then additional elements can be loaded and unloaded at runtime. Still, the one you created at design-time must remain.
In the case of your sprites, one could be placed on the form at design-time, with an Index of zero. The other sprites would then be loaded/unloaded at runtime.
<EDIT>
Additionally, a UserControl cannot unload itself. The controls should be loaded and unloaded by the program in which they are used.
Last edited by WizBang; September 22nd, 2009 at 11:24 AM.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
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
|