How to create a bitmap and save to disk

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

How to create a bitmap and save to disk

Post 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
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

use save2bmp method
Last edited by Silvio on Wed Apr 16, 2008 8:23 am, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Otto,

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

Code: Select all

oBtn:SaveToBmp("Button")
kind regards
Stefan
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Stefan, thank you very much.
All is working.
Regards,
Otto
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

glad to know it´s working :D
kind regards
Stefan
Post Reply