技术论坛

 回复:如何打印WINCC画面?

返回主题列表
作者 主题
hnzzhzs
游士

经验值:242
发帖数:122
精华帖:0
楼主    2004-04-19 07:47:48
主题:如何打印WINCC画面?
请教高手?如何在WINCC画面上设置一个按钮,通过点击此按钮来打印WINCC运行画面。
imchange
侠士

经验值:1343
发帖数:810
精华帖:3
    2004-04-19 13:12:30
精华帖  主题:回复:如何打印WINCC画面?
QUESTION:
How can I print a hardcopy in landscape format with WinCC V5 (SP2) / WinCC V5.1?

ANSWER:
To do this configure a button with the following command:

WinExec("PrtScr.exe -l -nomcp",SW_SHOWNORMAL);

The following parameters are available:

-nomcp: this parameters starts PRTSCR.exe, triggers the hardcopy and then closes again.
-hardcopy: this parameters starts PRTSCR.exe, triggers the hardcopy and waits for the hotkey.
-end: this parameter ends the instance of PRTSCR.exe currently running.
Note:
If Runtime has already started and you then configure this button, it may be that -hardcopy doesn't work because PRTSCR.exe is already active. You must then close Runtime and restart it. Or close it with -end and then use -nomcp.

QUESTION:
How can you make a hardcopy of picture subareas (e.g. curve windows)?
ANSWER:
You have located a curve window, for example, in your picture. Now you want to make a hardcopy of this window. You can do this if you have installed Basic Process Control on your computer. Then, in the DRIVE: \Siemens\WinCC\bin directory you will find the prtscrn.dll file. For the hardcopy you must know the coordinates and size of your window. Then you can trigger the hardcopy as follows via a button:

#pragma code ("prtscrn.dll")
#include "prtscrn.h"
#pragma code()
long Left, Top, Width, Height;
Left=20;
Top = 10;
Width=800;
Height = 400;
PrtScreenPart ((ULONG) Left, (ULONG) Top, (ULONG) Width, (ULONG) Height);
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。