Sunday, March 22, 2009

VB: Set printer font size for printing to printer

Hi Folks,

This time I'm explaining how to set the font size of the font. And using that font size send the text to your printer, so that your printer can print according to assigned fontsize.

So far I know two ways to change the font size for the Printer. Here are the ways. First one is directly set the values of your Printer's FontSize field.

Printer.FontSize = 20 'This will set printer's fontsize to 20 point

The second approach I know is, Set the size of Font that the printer will use.
Printer.Font.Size = 14 'This will set Font's size to 14 point

Now you have set the font size. Time to do some printing.
Printer.Print "Changing my font size for Printer"
Printer.Print "And its using Visual Basic"

Above command will print the text on separate line using the assigned font size. Thanks once again for reading my article.

No comments:

Get function name programaticaly - Python

This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...