Page 1 of 1

How to create a bitmap and save to disk

Posted: Wed Apr 16, 2008 5:42 am
by Otto
For my room planer I need a combobox to select the type of reservation and It would be a service to show the final color in the CBX, too.

You can select any color in the setup and it would be fine if I could create
a bitmap of the selection.

Does someone know how to do.

I thought to use TSBUTTON’s in the setup and to change the color of the buttons and
then with btn:hardcopy() . But I can’t find a way how to save the btn:hardcopy to disk.
Is there any other function?

Thanks in advance
Otto

Image
Image

Posted: Wed Apr 16, 2008 7:28 am
by Silvio
use save2bmp method

Posted: Wed Apr 16, 2008 7:56 am
by StefanHaupt
Otto,

there is a method SaveToBmp () (from windows.prg) that should do the job.

Code: Select all

oBtn:SaveToBmp("Button")

Posted: Wed Apr 16, 2008 8:28 am
by Otto
Stefan, thank you very much.
All is working.
Regards,
Otto

Posted: Thu Apr 17, 2008 7:26 am
by StefanHaupt
glad to know it´s working :D