11.3. Your First Printing Application

We just saw how the printing process works in the .NET Framework. Now let’s talk about how to write your first simple printing application. In this application we will send the text “Hello Printer!” to the printer from a Windows application. To create this application, follow the simple steps described here.

Using Visual Studio .NET, create a Windows application project named HelloPrinterSamp, as shown in Figure 11.6.

Figure 11.6. Creating a Windows application

After we create the project, we add the following line to it:

using System.Drawing.Printing;

Then we add controls for a label, a combo box, and ...

Get Graphics Programming with GDI+ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.