VSFlexGrid Control > VSFlexGrid Properties, Events, and Methods > VSFlexGrid Events > StartPage Event |
Fired before each page while the grid is being printed.
Private Sub VSFlexGrid_StartPage( ByVal hDC As Long, ByVal Page As Long, Cancel As Boolean)
This event gets fired once for each page while the grid is being printed with the PrintGrid method.
The parameters for the StartPage event are described below:
hDC As Long
This parameter contains a handle to the printer's device context. The hDC parameter is required by all Windows GDI calls, and you may use it to add graphical elements or text to the page.
Page As Long
The number of the page being printed.
Cancel As Boolean
Set this parameter to True to cancel the print job.
The following code outputs the current status of the print job to the debug window:
Private Sub fg_StartPage(ByVal hDC As Long, ByVal Page As Long, Cancel As Boolean)
Debug.Print "Printing page " & Page & "..."
End Sub