The PrintForm method sends an image of the current form to the default printer.
The sample application prints the image of the form shown below without the command buttons:
The code for this application is quite sparse (as it does not actually perform any calculations).
The Form_Load event contains code to center the form on the screen and to format the Date and Time labels:
The Click event for the Print button (cmdPrint_Click) hides the two command buttons (by setting their Visible properties to False), issues the PrintForm statement, then makes the buttons visible again:
The Click event for the Exit button (cmdExit_Click) ends the program by issuing the End command.
Download the project files for this sample application here.