FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Save dialog to Jpg RESOLVED
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Save dialog to Jpg RESOLVED
Posted: Thu Nov 14, 2024 10:13 AM

is it possible to save part of a dialog in a jpg file?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Save dialog to Jpg
Posted: Fri Nov 15, 2024 02:49 AM
Code (fw): Select all Collapse
oDlg:SaveAsImage( cFileJpg, { top, left, bottom, right } )
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Save dialog to Jpg
Posted: Fri Nov 15, 2024 09:21 AM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
oDlg:SaveAsImage( cFileJpg, { top, left, bottom, right } )

I made
oBar:AddItem( "Salva", "save_48.bmp", {|| SalvaDialog(nType,oDlg) }, {||.t.}, .f., "" )

Function SalvaDialog(nType,oDlg)
local cFileJpg1:= "TopTen_Lotto_Ritardatari.jpg"
local cFileJpg2:= "TopTen_Lotto_Frequenti.jpg"
If nType=1
oDlg:SaveAsImage( cFileJpg1, { 0, 0, oDlg:nbottom, oDlg:nright-100 } )
else
oDlg:SaveAsImage( cFileJpg2, { 0, 0, oDlg:nbottom, oDlg:nright-100 } )
endif
return nil


Problems

when the nType=1 save good





when the ntye =2 save bad



if the coordinates are the same how is it possible that in the second type it also prints the menu to the side and starts a black area to the right and below?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Save dialog to Jpg
Posted: Fri Nov 15, 2024 09:27 AM
Now I correct with this




local cFileJpg2:= "TopTen_Lotto_Frequenti.jpg"

local oRect:= oDlg:GetCliRect()

If nType=1

oDlg:SaveAsImage( cFileJpg1, { oRect:nTop, oRect:nLeft, oRect:nbottom, oRect:nright-100 } )

else

oDlg:SaveAsImage( cFileJpg2, { oRect:nTop, oRect:nLeft, oRect:nbottom, oRect:nright-100 } )

endif

return nil" alt="" loading="lazy">
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion