Tutorials > VSPrinter Tutorial - QuickPrinter > Step 5: Setting up the page and printer |
The next step is to allow the user to set up the page. This can be done easily using the VSPrinter's PrintDialog method. The PrintDialog method shows a system dialog that allows the user to select the page orientation, margins, paper type, and paper source. The dialog also has a button that allows the user to select the printer and set its properties.
After the user changes the page and printer properties, we have to render the document again, to reflect the new selections. Here's the code that does all this:
Example Title |
Copy Code
|
---|---|
Private Sub cmdSetup_Click() ' let user setup the printer and the page vp.PrintDialog pdPageSetup ' render current document again If FileName <> "" Then RenderFile End Sub |