Microsoft Visual Basic 2010 Step by Step eBook
Chapter 16 Inheriting Forms and Creating Base Classes 413 To Do This Set properties for an object variable Use the regular synta ...
...
415 Chapter 17 Working with Printers After completing this chapter, you will be able to: n Print graphics from a Visual Basic pr ...
416 Part III Designing the User Interface The PrintDocument class is located in the System.Drawing.Printing namespace. The Syste ...
Chapter 17 Working with Printers 417 Your form looks similar to this: Now add the program code necessary to print a graphic file ...
418 Part III Designing the User Interface events that represent crucial actions in the life cycle of an object. You have been wo ...
Chapter 17 Working with Printers 419 Now you’re ready to run the program. Before you do so, you might want to locate a few graph ...
420 Part III Designing the User Interface If you look closely, you see the following dialog box appear when Visual Basic sends y ...
Chapter 17 Working with Printers 421 Use the TextBox control to draw a text box object below the label object. The text box ob ...
422 Part III Designing the User Interface Now scroll back down to the Button1_Click event procedure, and then enter the followi ...
Chapter 17 Working with Printers 423 Now you’ll run the program to see how a text box object prints. Run the Print Text program ...
424 Part III Designing the User Interface Printing Multipage Text Files The printing techniques that you’ve just learned are use ...
Chapter 17 Working with Printers 425 Click the RichTextBox control in the Toolbox, and then draw a rich text box object that co ...
426 Part III Designing the User Interface Scroll to the top of the form, and then enter the following code: Imports System.IO ...
Chapter 17 Working with Printers 427 Add code for the btnPrint and PrintDocument1 objects Display the form again, and then doub ...
428 Part III Designing the User Interface 'Compute how many chars and lines can fit based on sizeMeasure e.Graphics.MeasureStrin ...
Chapter 17 Working with Printers 429 Browse to the C:\Vb10sbs\Chap17 folder, and then click the Longfile .txt file. In Windows ...
430 Part III Designing the User Interface Verify that your printer is on, and then click the Print button. Visual Basic displa ...
Chapter 17 Working with Printers 431 Two additional printing controls are available on the Printing tab of the Toolbox, and they ...
432 Part III Designing the User Interface Your form looks like this: Double-click the Page Setup button (btnSetup) to display t ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf