|
-
Aug 4th, 2000, 04:01 PM
#1
Thread Starter
Addicted Member
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
Zvonko Bostjancic
Ilirska Bistrica, Slovenia
[email protected]
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
-
Aug 4th, 2000, 07:06 PM
#2
Hyperactive Member
Try this syntax
printer.print text1.text
Matt 
-
Aug 4th, 2000, 07:25 PM
#3
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)
-
Aug 4th, 2000, 08:28 PM
#4
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.
-
Aug 5th, 2000, 07:16 AM
#5
Thread Starter
Addicted Member
Thanks, guys...
You're soooooo good...
Zvonko Bostjancic
Ilirska Bistrica, Slovenia
[email protected]
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|