VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456[7]8910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 07:12:51 12/17/01 Mon
Author: Michel
Subject: Re: LoadFromResourceName
In reply to: Kai 's message, "LoadFromResourceName" on 20:58:00 12/16/01 Sun

Hi Kai,

I have not used resource streams, but it is possible that the stream is not at the beginning. Do a

Stream.Seek(0, soFromBeginning) before calling load from stream.

Best regards,

Michel

>
>
>I am trying to simulate LoadFromResourceName like
>below. This does give me an 'Bitmap is invalid'...
>
>What am I doing wrong?
>
>Thanks,
>Kai
>
>
>
> try
> stream := TResourceStream.Create( hInstance,
>'IMG_MISSING', RT_BITMAP );
> imagescrollbox.LoadFromStream( stream, 'BMP', 1
>);
> imagescrollbox.Hint := 'Picture file is invalid
>or unsupported.';
> finally
> stream.Free;
> end;

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.