How to create a bitmap and save to disk

How to create a bitmap and save to disk

Postby Otto » Wed Apr 16, 2008 5:42 am

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
Otto
 
Posts: 6344
Joined: Fri Oct 07, 2005 7:07 pm

Postby Silvio » Wed Apr 16, 2008 7:28 am

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

Postby StefanHaupt » Wed Apr 16, 2008 7:56 am

Otto,

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

Code: Select all  Expand view  RUN
oBtn:SaveToBmp("Button")
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Otto » Wed Apr 16, 2008 8:28 am

Stefan, thank you very much.
All is working.
Regards,
Otto
User avatar
Otto
 
Posts: 6344
Joined: Fri Oct 07, 2005 7:07 pm

Postby StefanHaupt » Thu Apr 17, 2008 7:26 am

glad to know it´s working :D
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 41 guests

cron