Industry Online Support
Technical Forum
1/25/2011 1:21 PM | |
Posts: 79 Rating: (0) |
Dear All, need vb script for How do you print a hard copy in landscape format with WinCC? right now i am using below script portrait page it is working. Sub OnMTClick_Print(Item) Dim objwshell Set objwshell=CreateObject("wscript.shell") objwshell.Run"PRTSCR.EXE -hardcopy",1 End Sub i know c code. #include "apdefap.h" void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { WinExec("PrtScr.exe -l -nomcp",SW_SHOWNORMAL); } |
1/26/2011 8:08 AM | |
Posts: 291 Rating: (68) |
Helloboopathi@sequent, Please try the followings: (& please call it from a MenuToorbar item!) Sub ScreenSnap(Byval MenuParameter) Dim objShell Const NORMAL_WINDOW=1 Set objShell = CreateObject("Shell.Application") If MenuParameter.UserData = "" Then objShell.ShellExecute "C:\Program Files\Common Files\Siemens\BIN\PrtScr.exe", "-End" 'Please deactivate it before calling! objShell.ShellExecute "C:\Program Files\Common Files\Siemens\BIN\PrtScr.exe", "-l -nomcp",,, NORMAL_WINDOW Else objShell.ShellExecute MenuParameter.UserData,,, NORMAL_WINDOW End If Set objShell = Nothing End Sub Best regards, Komi |
1/27/2011 7:29 AM | |
Posts: 79 Rating: (0) |
thanks komi, i tested it is working fine. [schnippschnapp] new question is splitted to how to call (vb.exe) using menu toolbar. |
Last edited by: O_Moderator at: 1/27/2011 9:42 AM |
|
Follow us on