>>Cesar - I am finding that the Getpicturevalfromhbitmap method call in your VFPPaint application has problems when the images selected for viewing are of a certain size. Selecting JPGs 900k+ in size results in the error shown below. Are you aware of a image size limitation?
>>
>>
>>XFCBITMAP.GETPICTUREVALFROMHBITMAP
>>
>>AERROR() contents
>>2059
>>Unhandled Structured Exception.
>>ErrorNo: 1903
>>Message: String is too long to fit.
>>UserValue:
>>Details:
>>Procedure: getpicturevalfromhbitmap
>>
>>PROCEDURE VFPPAINT.INIT
>>PROCEDURE VFPPAINT.UPDATECANVAS
>>PROCEDURE XFCBITMAP.GETPICTUREVALFROMHBITMAP SYSTEM.DRAWING.FXP
>>(XFCBITMAP.GETPICTUREVALFROMHBITMAP)
>>
>>
>
>
>Hi Chris,
>I really had no idea of that kind of limitation.
>
>Anyway, we can still use a different encoder that uses less space - the PNG
>
>Please make a backup of VFPPaint.Scx, and lets play with your copy, making some changes as follow:
>
>USe the Search / replace tool
>
>Search for the string:
>".GetPictureValFromHBitmap()"
>
>
>REPLACE in all occurencies with:
>".GetPictureVal(_Screen.System.Drawing.Imaging.ImageFOrmat.Png)"
>
>without the quotes, :-)
>
>Test it and tell me how it goes !
>IMPORTANT - recommended VFP9 SP2 for this purpose,other versions may crash
>
>
>Hope this helps !
>
>Cesar
That worked like a charm. Can now load 2.5meg pics. Thanks for the quick reply. Great app btw.