[RESOLVED] Printing contents of textbox during runtime?
Now that I know how to change the font of a textbox during runtime, now I need to know how to print the contents of the said textbox during runtime. It's a text / source code editor that I'm making in VB6.
I have the common dialog control set up to use the print dialog, by the way.
Re: Printing contents of textbox during runtime?
The common dialog does not print. It will tell you what folder & filename the user selected (SaveAs), but you still need to save the contents to a file you create: open, print/write, close
The FAQs section linked in my signature below does have examples of reading/writing a simple file.
Wow! How did I read "print" and think "save"? Ignore above.
Re: Printing contents of textbox during runtime?
Actually as I'm sure you know LaVolpe, you don't need to a file to be able to print. So 3no7ch all you need to do if you want to is
Code:
Printer.Print Text1.Text
' This or ending the app prints whatever text you want to print
Printer.EndDoc
Re: Printing contents of textbox during runtime?
Actually, I already found something online, so I don't need help now.