How to "save as" instead of "save"

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
Posts: 168
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF
Has thanked: 51 times
Been thanked: 7 times

How to "save as" instead of "save"

Post 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

User avatar
Posts: 1240
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 37 times
Been thanked: 103 times

Post 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
Andrés González López
Desde Guadalajara, Jalisco. México.

Post Reply