FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Draw and save window without showing
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Draw and save window without showing
Posted: Fri Jun 22, 2012 11:52 AM
Hi,

For a documention-program that create excel-files with drawings I open a window, draw lines en text on in and save it to a bmp-file to create bmp-files.
The program show it on the screen. Is it possible to do this without showing it? Sometimes, I want to create more then 10000 BMP-files, and I think showing them slow down the generation.

I use now something like this for each file in a loop:
Code (fw): Select all Collapse
   DEFINE WINDOW sWnd TITLE 'SCHEMATIC : '+infoall->filenaam FROM 0,0 TO 416,640 PIXEL BORDER NONE NOSYSMENU NOICONIZE NOCAPTION

   sWnd:bPainted  := { || _toonds(vnr,vnrvar)}

   ACTIVATE WINDOW sWnd

   sWnd:SaveToBmp( alltrim(infoall->voorbeeld) )
   sWnd:end()


The function _toonds(vnr,vnrvar) drow text, lines, polygons,... on the window.

Thanks,
Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Draw and save window without showing
Posted: Fri Jun 22, 2012 01:46 PM

Marc,

You may not need to create a window everytime, and simply reuse the existing one, so the whole process will speed up :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Draw and save window without showing
Posted: Fri Jun 22, 2012 03:34 PM

Antonio,

How can I clear the content of the Window?

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Draw and save window without showing
Posted: Tue Jun 26, 2012 12:21 PM

Antonio,

Can you tell me how to clear the window after drawing some lines an solids and saving it?

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Draw and save window without showing
Posted: Tue Jun 26, 2012 01:47 PM

Marc,

oWnd:Refresh()

will clear it and it will be repainted :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion