Print Text box Content

beggar
09-02-2000, 06:06 AM
Can you help out!

I am trying to print the contents of a wide text box using the Printer.Print command. The problem is that the user enters text but the text box handles the text by wrapping it. Because there is no carriage return, when i try and print, the contents print to the edge of the page width and the rest is truncated rather than printing on the next line. HOW do i get around this.

Any help appreciated.
beggar.......

makai
09-02-2000, 12:41 PM
set a temp variable = text1.text
take a number - like x=70
search back in temp from x to find a space

print the part of temp before that

set the temp = right(temp,len(temp)-x)

loop through until done

Phil
09-04-2000, 05:50 AM
Hi,
To accurately access the lines in a multiline textbox you must turn to the SendMessage function of the API. The method is fully explained in the MSDN article Q140886 found at:

http://support.microsoft.com/support/kb/articles/Q140/8/86.asp?LN=EN-US&SD=msdn&FR=0

Good Luck
Phil

beggar
09-05-2000, 06:45 AM
Thanks Heaps Phil.
I took your advice, and with a little modification to suit my application, Hey Presto!
This is the first time i have needed any help to solve a problem, and it just proves the worth of such forum's.
Thanks Again.

Thanks very much Also to Makai.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum