The methods of the Graphics object give you complete flexibility to place text or objects at any point in any drawing area. In this exercise, you use these positioning capabilities to print a database table in multiple columns. This exercise also shows how you can use the QueryPageSettings event to force the printed output to be in landscape mode.
Estimated time: 25 minutes
Open a Visual C# .NET Windows application in the Visual Studio .NET Integrated Development Environment (IDE). Add a new form to the application.
Add a Label control, a TextBox control (txtSQL), and two Button controls (btnPreview and btnPrint) to the form. Set the MultiLine property of the TextBox control ...