UGN Security
Posted By: BackSlash Printing Multi-Lline Text Boxes - 11/05/02 09:28 PM
i'm trying to print the text from a multi line text box. i tried Printer.Print Text1.Text however, that just printed the first line and stopped. is there a simple way that i am overlooking to get it to print the entire contents? let me know what i'm doing wrong
Posted By: SilentRage Re: Printing Multi-Lline Text Boxes - 11/06/02 07:51 PM
I have no frickin clue. I would think that would work. However, you can try a cheap fix.

Data = Text1.Text
Printer.Print Data

If that doesn't work, try this:

Lines = Split(Text1.Text, vbcrlf)
For X = 0 To UBound(Lines)
Printer.Print Lines(X)
Next
Posted By: BackSlash Re: Printing Multi-Lline Text Boxes - 11/07/02 01:11 AM
the first one gives me the same result, just prints one line and stops, the second one won't work, it doesn't recognize "Split". i'm using vb4, probably to old, i imagine
Posted By: SilentRage Re: Printing Multi-Lline Text Boxes - 12/07/02 06:45 PM
neo, shut up. He's talking about TEXT BOXES not LIST BOXES.

(in reply to neo's post which he's later deleted which stated something along these lines - SR did a goof. All you need is: <insert code to print the contents of a list box>)
Posted By: ninjaneo Re: Printing Multi-Lline Text Boxes - 12/12/02 02:36 PM
god damnit
Posted By: ninjaneo Re: Printing Multi-Lline Text Boxes - 12/22/02 02:57 PM
hrm... you know what... I think it is worth a try doing this... Print Me.Text1
and if that bitches at you try Print Me.Text1.Text
/e shrugs...
Posted By: SilentRage Re: Printing Multi-Lline Text Boxes - 12/22/02 10:03 PM
Essentially that's the same thing as "i tried Printer.Print Text1.Text" and will not work any better.
Posted By: ninjaneo Re: Printing Multi-Lline Text Boxes - 01/04/03 02:30 AM
yah... To the newest version of VB but maybe not the older? frown
Posted By: SilentRage Re: Printing Multi-Lline Text Boxes - 01/04/03 07:21 PM
yeeeeeeees neo, that's what backslash said:

"i'm using vb4, probably to old, i imagine"

and that's why I didn't further help the guy.
© UGN Security Forum