Page 1 of 1

How to "save as" instead of "save"

Posted: Mon Mar 18, 2019 4:07 am
by bluebird
Dear forum

I would like help on converting the code below which currently prints a part of my screen (form_2) but
saves the image file in the HMG tree directory. Would like to save it to the windows 10 picture
file or some other place of my choice.

The PrintForm_2() code below is from an old HMG forum entry. I think it would work for my PrintForm_2() Function n'est pas?
Please advise with my sincere thanks to all who read this forum entry.

FUNCTION SaveDisplay()
* Called From BUTTON PrintScreen
LOCAL cImageFileName:=" Form_2 Display.jpg"
LOCAL lPrint:=.f.,lSave:=.f.

lSave :=msgYesNo("Do you want to Save "+cImageFileName)

If lSave
BT_BitmapSaveFile(hBitmap, cImageFileName )
BT_BitmapRelease( hBitmap )
lPrint:=msgYesNo("Do you want to Print the screen?")
if lPrint
PrintForm_2() // function PrintForm_2 not yet implemented but code below should work

/* PrintForm_2()
select printer default preview
start printdoc
start printpage
hDC := OpenPrinterGetPageDC()
BT_DrawBitmap ( hDC, 100, 100, 500, 500, BT_STRETCH, hBitmap )
end printpage
end printdoc

Re: How to "save as" instead of "save"

Posted: Mon Mar 18, 2019 4:51 am
by andyglezl
Maybe this...

Opens The 'Browse For Folder' System Dialog And Returns Selected Folder Path


GetFolder ( [<cTitle>] , [<cInitPath>], [<cInvalidDataMsg>], [<lNewFolderButton>] , [<lIncludeFiles>] , [<nCSIDL_FolderType>] , [<nBIF_Flags>] )--> cSelectedFolderName