Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Progress 4gl 正在运行的活动窗口的屏幕截图-4GL_Progress 4gl_Openedge - Fatal编程技术网

Progress 4gl 正在运行的活动窗口的屏幕截图-4GL

Progress 4gl 正在运行的活动窗口的屏幕截图-4GL,progress-4gl,openedge,Progress 4gl,Openedge,我正在处理4GL,在我的应用程序中,我希望在任何击键事件(如(CTRL+F9))上快速显示活动窗口,并将其保存在预先指定的文件夹中。有人能帮我吗?如评论中所述,这可以通过从Progress ABL调用.NET来完成。下面是一个示例,它截图显示了整个屏幕。你需要根据自己的需要来调整 USING System.Drawing.*. USING System.Drawing.Imaging.*. USING System.Windows.Forms.Screen. DEFINE VARIABLE b

我正在处理4GL,在我的应用程序中,我希望在任何击键事件(如(CTRL+F9))上快速显示活动窗口,并将其保存在预先指定的文件夹中。有人能帮我吗?

如评论中所述,这可以通过从Progress ABL调用.NET来完成。下面是一个示例,它截图显示了整个屏幕。你需要根据自己的需要来调整

USING System.Drawing.*.
USING System.Drawing.Imaging.*.
USING System.Windows.Forms.Screen.

DEFINE VARIABLE bmpScreenshot AS Bitmap NO-UNDO.
DEFINE VARIABLE gfxScreenshot AS Graphics NO-UNDO.

bmpScreenshot = NEW Bitmap(Screen:PrimaryScreen:Bounds:Width,
                           Screen:PrimaryScreen:Bounds:Height,
                           PixelFormat:Format32bppArgb).

gfxScreenshot = Graphics:FromImage(bmpScreenshot).

gfxScreenshot:CopyFromScreen(Screen:PrimaryScreen:Bounds:X,
                            Screen:PrimaryScreen:Bounds:Y,
                            0,
                            0,
                            Screen:PrimaryScreen:Bounds:Size,
                            CopyPixelOperation:SourceCopy).

/* Use ImageFormat:[Png|Gif|Bmp|Tiff] etc for different image formats */
bmpScreenshot:SAVE("c:\temp\Screenshot.png", ImageFormat:Png).

这是从C#到ABL的翻译。

这类似于沿着这条路线提出的其他问题,可以使用.NET进行查询:可能是的副本