This sample application demonstrates how to print text and configure the printer.
Security Note |
---|
This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended. |
To run this sample
Click the Download Sample button on this page. In the File Download dialog, select Open.
Save the files to your computer.
In Visual Studio, select the File menu, then Open, then Project/Solution.
Browse to the folder where you saved the files and select the solution file. This opens the solution in Visual Studio.
Press F5.
To view the sample documentation
In Solution Explorer, double-click the Documentation folder.
If you are using Visual Basic Express Edition, right-click ReadMe.htm in the Documentation folder. Select View in Browser.
If you are using another version of Visual Basic, double-click ReadMe.htm in the Documentation folder.
Demonstrates
The sample prints a few paragraphs of text, demonstrating print preview, print setup, and page setup.