Printing in .Net 2.0
Enable printing in your .net windows applications: Supporting printing in your .net application is a simple process. In this article I'll show you of printing in your .net 2.0, how you can configure page setup, print multiple pages, and preview a document before being printed, as well as let users select a printer to which to print. Creating the sample application: Open Visual Studio 2005; create a new Windows application project using C#: Figure 1. In .NET, all the printing functionality is encapsulated within the PrintDocument control which can be found in the ToolBox. The PrintDocument control defines various methods that allow you to send output to the printer. To incorporate printing functionality into you Windows application, you can simply drag and drop the PrintDocument control on to your form (see Figure 2), or create an instance of the PrintDocument class during runtime. Figure 2 There are generally three events that you need to ...