Solved

printing a text box

Posted on 1998-08-24
9
128 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
 

Author Comment

by:hess
ID: 1430780
i was hoping that kamall would answer this cause i need to give him some points
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now