Other Printing Changes
In Visual Basic 6.0, the PrintForm method of a form could be used to send an image of the form to a printer. The PrintForm method is no longer supported in Visual Basic .NET. The results of the PrintForm method varied greatly depending on the screen resolution and the resolution of the printer; it was not the recommended method of printing. If you need to duplicate the functionality of the PrintForm method, you can automate the screen capture capabilities of a third-party graphics tool to capture and print an image of a form.
In Visual Basic 6.0, implementing print preview was only possible through third-party controls. In Visual Basic .NET, the PrintPreviewDialog control can be used to provide a standard Windows Print Preview dialog box. For more information, see Introduction to the Windows Forms PrintPreviewDialog Control.
In Visual Basic 6.0, no user interface for page setup was provided. In Visual Basic .NET, the PageSetupDialog control can be used to provide a standard Windows Page Setup dialog box. For more information, see Introduction to the Windows Forms PageSetupDialog Component.
In Visual Basic 6.0, printing text from a file required a considerable amount of code. In Visual Basic .NET, the StreamReader class can be used to pass the contents of a text file directly to a PrintDocument component. For details, see PrintDocument.Print Method.
Partager