Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

printing a text box

How would i go about printing the contents of a textbox named txtmain
0
hess
Asked:
hess
  • 4
  • 3
  • 2
1 Solution
 
kamallCommented:
Use the printer object to print the text as shown below:

Printer.Print MyString

MyString is the string to print. Note that the printer object does not wrap text. Therefore, you must read the characters one by one from the text box and use the TextWidth function and compare it with the Printer.ScaleWidth to determine if the line fits on the page width. If not, start a new line.

Hope that helps.
0
 
hessAuthor Commented:
This does answer my question but if you could tell me how to find out when the printer is finished i'll give you 15 more pts
0
 
watyCommented:
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hessAuthor Commented:
i was hoping that kamall would answer this cause i need to give him some points
0
 
watyCommented:
One solution is giving 15 points to kamall, and 15 points to me. ;)
0
 
hessAuthor Commented:
I guess i can give you 15 points so propose answer and they are yours
0
 
watyCommented:
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it
0
 
kamallCommented:
hess,
Sorry for being away for a few days.
I am seeing that you rejected my answer (that was really the answer to your original question) just because you put another question!.
Anyway, if you would like to give me some points, thanks. If not, there is no problem.
Regards.
0
 
hessAuthor Commented:
shure, I'll give you some points. There will shortly be a question called "15pts for karmall" and i'll only let you answer it ok.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now