-
Hello!
I know it's kind a stupid question and it looks that I'm rookie in VB, but I forgot it. I forgot how can I print text from textbox. Can anyone help me?
I know it seems like I've just installed VB, but I haven't used those printing functions for text box for over a year and I forgot all.
Zvonko
-
Try this syntax
printer.print text1.text
-
Try:
Code:
Printer.Print Text1.text 'Print text
Printer.EndDoc 'Do not print blank pages (this is if the user presses return to a new page)
-
It's a good idea to set the Font and Position as well.
Code:
'Set the X and Y postions to a 1x1" border
Printer.CurrentX = 1440
Printer.CurrentY = 1440
Printer.FontName = Text1.FontName
Printer.FontSize = Text1.FontSize
'You can also use FontItalic, FontStrikeThru and FontUnderline
Printer.FontBold = Text1.FontBold
Printer.Print Text1.Text
Printer.EndDoc
The EndDoc method will begin printing directly after the message has been sent. If you do not include it, the Printer will only print when your Application closes.
-
Thanks, guys...
You're soooooo good...