Colors sample. Portion of a VB program.
The following is an easy
example of how to change colors using Rpv Reports.
Open
"c:\windows\temp\colors.rpv" For Output As #1
Print #1, "Report_title=Sample of colors"
Print #1, "spacing=250"
Print #1, "$col0=400"
Print #1, "[header]"
Print #1, "{f=arial;b=y;s=10}"
Print #1, "{$col0} Color samples {\n;\n}"
Print #1, "[data]"
For rtr = 0 To 15
Print #1, "{$col0;c=" & rtr & "}
This has been printed using color # " & rtr
& "{\n}"
Next rtr
Close
x = Shell("rpv c:\windows\temp\colors.rpv",
vbMaximizedFocus) |
To execute this program just open a new project on VB. After this, insert a button and paste this code associated with the click of the button.
Try then to run the program. It is important that you note that the directory the program will write to exists and the user has enough right to do it.
Something else to be checked is that the function SHELL is able to execute the file RPV.EXE. Otherwise, it should be changed indicating the complete path of the file RPV.EXE.
This program will show the following.
|