Solved

printing a text box

Posted on 1998-08-24
9
130 Views
Last Modified: 2010-04-30
How would i go about printing the contents of a textbox named txtmain
0
Comment
Question by:hess
  • 4
  • 3
  • 2
9 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 1430777
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
 

Author Comment

by:hess
ID: 1430778
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
 
LVL 14

Expert Comment

by:waty
ID: 1430779
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:hess
ID: 1430780
i was hoping that kamall would answer this cause i need to give him some points
0
 
LVL 14

Expert Comment

by:waty
ID: 1430781
One solution is giving 15 points to kamall, and 15 points to me. ;)
0
 

Author Comment

by:hess
ID: 1430782
I guess i can give you 15 points so propose answer and they are yours
0
 
LVL 14

Accepted Solution

by:
waty earned 10 total points
ID: 1430783
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it
0
 
LVL 7

Expert Comment

by:kamall
ID: 1430784
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
 

Author Comment

by:hess
ID: 1430785
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question