Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB - Changing font size with the Print# command

Status
Not open for further replies.

MrMiller

Aerospace
Joined
Jan 30, 2004
Messages
54
Location
US
Is it possible to change the font size and use the print# command. Below you can sort of see what I want to do but it will not work. What is the proper method to achieve this?

Open FileName For Append Access Write Lock Write As #1
Font.Size = 16
Print #1, "Print Line 1 at font size 16"
Font.Size = 10
Print #1, "Print Line 2 at font size 10"
Close #1
 
The Print # statement is designed to store text as straight ASCII data, with date values stored in your local system short date format and numbers stored in an international format recognising local decimal separators.

To store text with font info you should look into the RichTextBox control, and its LoadFile and SaveFile statements, or you could hand-code the data as an HTML file.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top