Hi Michael,
Sorry for the late answer, but i am retired and read not often the forum anymore
but mayby this can help, just give it a try
greetings Marc.
Create a global variable gv_EventPrint is int
On the screen:
I place on plane 10 an hidden image called: IMG_ScreenPrint
In the global declarations of the screen:
gv_EventPrint = Event(StringBuild(MyWindow..Name + ".lp_CheckKey"), "*.*", WM_KEYDOWN)
when you take control of that screen and press the <F12> button the local procedure in that screen starts:
FUNCTION lp_CheckKey(p_Mess is int , p_Par1 is int , p_Par2 is int )
p_Mess = 0
p_Par2 = 0
EndEvent(gv_EventPrint)
SWITCH p_Par1
CASE 112 //Functietoets <F1> ingedrukt
SWITCH gW_Mode
CASE "B" // BROWSE
CASE "A" // ADD
WHelp(StringBuild(gv_DirectoryHelpFile + "Help_RIETVELDE.CHM"), 32)
CASE "D" // DELETE
WHelp(StringBuild(gv_DirectoryHelpFile + "Help_RIETVELDE.CHM"), 60)
CASE "M" // MODIFY
WHelp(StringBuild(gv_DirectoryHelpFile + "Help_RIETVELDE.CHM"), 48)
OTHER CASE
END
CASE 113 //Functietoets <F2> ingedrukt
Open(Dorinda_Info)
CASE 114 //Functietoets <F3> ingedrukt
CASE 115 //Functietoets <F4> ingedrukt
CASE 116 //Functietoets <F5> ingedrukt
CASE 117 //Functietoets <F6> ingedrukt
CASE 118 //Functietoets <F7> ingedrukt
CASE 119 //Functietoets <F8> ingedrukt
CASE 120 //Functietoets <F9> ingedrukt
CASE 121 //Functietoets <F10> ingedrukt
CASE 122 //Functietoets <F11> ingedrukt
CASE 123 //Functietoets <F12> ingedrukt
gp_PrintScreenLandscape(Handle(),StringBuild(MyWindow..Name + ". IMG_ScreenPrint") , True )
END
gv_EventPrint = Event(StringBuild(MyWindow..Name + ".lp_CheckKey"), "*.*", WM_KEYDOWN)
the global function gp_PrintScreenLandscape:
PROCEDURE gp_PrintScreenLandscape(p_Hand is int, p_ImageName is string = "Name.bmp", p_Screenshot is boolean = True )
LOCAL
l_Temp is string
l_Handle, l_Res are int
Multitask(1)
{p_ImageName}..Height = WinInHeight()
{p_ImageName}..Width = WinInWidth()
IF NOT dCopyBlt(copyScreen, p_ImageName, copySrcCopy, WinInXPos(), WinInYPos(), WinInHeight(), WinInWidth()) THEN
Error("Geen scherminformatie gevonden om af te drukken.")
ELSE
l_Temp = fRĂ©pertoireTemp()+"SchermAfdruk.bmp"
dSaveImageBMP(p_ImageName, l_Temp)
l_Handle = p_Hand
l_Res = CallDLL32("user32", "OpenClipboard", l_Handle)
IF l_Res = 0 THEN
Info("Probleem bij het openen van het clibbord")
ELSE
l_Res = CallDLL32("user32","EmptyClipboard")
IF l_Res = 0 THEN Info("calldll probleem bij EmptyClipboard")
l_Res = CallDLL32("user32", "SetClipboardData", 2, p_ImageName)
IF l_Res = 0 THEN Info("calldll probleeem bij SetClipboard")
l_Res = CallDLL32("user32", "CloseClipboard")
IF l_Res = 0 THEN Info("calldll probleem bij CloseClipboard")
//Printer op Landscape zetten en Dialoogbox voor printersetup laten zien
IF iParameter("ORIENTATION=LANDSCAPE") THEN
IF p_Screenshot THEN
iPreview()
iPrintImage(l_Temp, 0, 0, 287, 201)
iEndPrinting
END
END
END
END
{p_ImageName}..Height = 40
{p_ImageName}..Width = 40
{p_ImageName} = ""