![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello all,
The following code gives me an out of memory error IDE error. The error is on the last line when I assign the imagebutton1.image to bin.retrieveimage. There are several images embedded in data.dat. If I change imagebutton1.image to image1.image all is fine. Using version 6.05. Code:
FileOpen(c1,"data.dat",cRandom) bin.New1(c1,true) image1.Image=bin.RetrieveImage imagebutton1.Image=bin.RetrieveImage FileClose(c1) Quote:
Thanks |
|
|||
|
I never used RetrieveImage, but I suppose that in order to embed several images into the .dat file you used the EmbedFile command.
Have you alredy tried the Retrievefile? Have you tried to switch the "Image" instruction with the "imageButton" instruction just to see if the program behaviour changes? It seems to me, but I'm not an expert, that RetrieveImage could raise the error for 2 reason 1) he starts reading at an offset of the .dat file where there are no information about the image file (something has been already read by the image instruction and the pointer has been moved) 2) he can read only an image (there are no parameters to specify what and where to read inside the .dat) But as I said I could be totally wrong.. Mimmo |
|
|||
|
skipper,
I did use the embedfile command to create the data.dat. All works fine if I use image1.image or form1.image with bin.retrieveimage, so I know data.dat is OK. It is only when I use imagebutton1.image that I get this error. My understanding is that a bitmap is passed by bin.retrieveimage and then should work for all object.image. Imagebutton1.image="file.gif" works as well. I think it might be a bug of some kind. thanks |
|
||||
|
Bonjour kolbe
I had the same kind of problem. Your ImageButton1 is probably set to transparent, in this case you get an error. If you set transparent to false and after loading the image you set it to transparent it works. Look under Image problem with ImageButtons Meilleures salutations Klaus Switzerland |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AddEvent & ImageButton in IDE | agraham | Bug Reports | 1 | 09-10-2008 09:31 PM |
| ImageButton MouseOver | superbabicka | Questions & Help Needed | 0 | 06-29-2008 09:19 PM |
| Getting ImageButton image from database | glook | Questions & Help Needed | 5 | 11-16-2007 08:31 AM |
| .color doesn't work on ImageButton | Mistrel | Questions & Help Needed | 2 | 10-13-2007 07:32 AM |
| I need examples for imagelist imagebutton | sloopa | Questions & Help Needed | 2 | 05-19-2007 05:00 PM |