Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Retrieve Image from Sprite


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2008, 02:48 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Question Retrieve Image from Sprite

Hi all.

I wonder how to retrieve an Image from sprite (if there are any possibilities to do it).

Thanks in advance.

Best regards, fjsantos.
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 05:06 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

It is not possible.
You can store the image in an ImageList before assigning it to the sprite.
Reply With Quote
  #3 (permalink)  
Old 06-16-2008, 05:20 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

Ok, thanks, that it the method i suppose may use.

Btw, its possible to 'update' image on Sprite or I need to create new one?

Best Regards, fjsantos.
Reply With Quote
  #4 (permalink)  
Old 06-16-2008, 05:28 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

You will need to create a new one.
It is possible however to use the same object and just reinitialize it with New2 or New3.
Reply With Quote
  #5 (permalink)  
Old 06-16-2008, 05:31 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

Yes, but I have to use dispose method first for memory purposse?

Best Regards, fjsantos.
Reply With Quote
  #6 (permalink)  
Old 06-16-2008, 05:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

You can use dispose and then AddObject (if you want to use the same object's name).
If you will not call dispose the sprite will be eventually implicitly disposed.
Reply With Quote
  #7 (permalink)  
Old 06-16-2008, 05:57 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

This work then like 'garbage recollector' of java i suppose.

Yesterday, doing some test i get 'out of memory' randomly when not use dispose method first. (Well i was creating a lot of sprites hehe).

Best Regards, fjsantos.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve free space MM2forever Questions & Help Needed 5 11-22-2008 05:50 PM
retrieve images and index lux1963 Questions & Help Needed 3 05-18-2008 02:42 PM
Retrieve Device Parameters alfcen Share Your Creations 14 03-23-2008 08:11 AM
Retrieve version timsteeman Questions & Help Needed 8 11-16-2007 07:43 PM
retrieve labelnames on a form Scubaticus Questions & Help Needed 1 08-03-2007 11:51 PM


All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0