| Directives |
|
| Format | SAVE CONTROL ctl_id TO filename$ [,ERR=stmtref] Where: |
||
| ctl_id | Unique value of the control to capture, or 0 (zero) to capture the | ||
| ProvideX desktop | |||
| filename | A valid filename with the .bmp extension | ||
| stmtref | Program line number or statement label to which to transfer control. | ||
| TO | Mandatory keyword, not case-sensitive. | ||
| Description | Use the SAVE CONTROL directive to capture graphical controls or the ProvideX desktop and store the results in a bitmap (.bmp) file. These saved images can then be used by the 'PICTURE' mnemonic. This command will not work on invisible objects/windows. As most of the functionality is controlled through Windows API calls, it is possible to receive an Error #15: Operating system command failed if the operating system is unable to execute the necessary functions. |
||
| *Note* | In a WindX environment, the SAVE CONTROL directive is passed to the WindX | ||
| client, therefore filename must be a file on the WindX client, not on the server. | |||
| See Also | 'PICTURE' Mnemonic. | ||
| Example | 00010 ! SAVE.CTL - Create a Chart then save Control & Screen images 00020 PRINT 'CS','FONT'("MS Sans Serif",-12),'GF', 00030 ! 00100 ! ^100 - Create the Chart 00110 Chrt=100; CHART Chrt,@(20,0,40,20),SEP=",",FMT="3DColumn",FNT="Verdana" 00120 CHART LOAD Chrt,"2,3,4,5,6,7,8,9,10,11,12,13/1,2,3,4,5,6,7,8,9,10,11,12/" 00130 Chrt'Title1$="Title 1",Chrt'Title2$="Title 2",Chrt'Footer$="Footer" 00140 Chrt'XAxisTitle$="X-Axis Title",Chrt'YAxisTitle$="Y-Axis Title" 00150 Chrt'CurrentSet=1,Chrt'CurrentPoint=0,Chrt'LegendText$="Item #1" 00160 Chrt'CurrentSet=2,Chrt'CurrentPoint=0,Chrt'LegendText$="Item #2" 00170 Chrt'PointText$="Jan,,Mar,,May,,Jul,,Sep,,Nov,," 00180 ! 00200 ! ^100 - Save the images 00210 SAVE CONTROL Chrt ON "Chart.bmp",ERR=*NEXT 00220 SAVE CONTROL 0 ON "Screen.bmp" 00230 ! 00300 ! ^100 - Print the saved images 00310 OPEN (1)"*winprt*;asis" 00320 PRINT (1)'PICTURE'(@X(0),@Y(0),@X(70),@Y(24),"Chart.bmp",2), 00330 PRINT (1)'PICTURE'(@X(0),@Y(25),@X(70),@Y(49),"Screen.bmp",2), 00340 CLOSE (1) 00350 END |
||