more printing stuff ???s

nsmoller
09-09-2003, 09:17 AM
ok thanks for help yesterday everyone...

i've gotten concepts of printing down i think. the enddoc/killdoc is similar to the committrans/rollbacktrans commands so i can now use those on the printdialog ok/cancel functions.

currentx/y has been a help - i'm using it to plot where the text is exactly going to be.

1. does the current x reset after each print command?

2. would it be smarter if printing a document with text to use the currentx = xpoint +/- textwidth property? i figure so because it will allow for font size changes, etc down the line, plus will make it look spaced appropriately.

3. shapes, tables, shading, etc etc etc... How are these handled using the print function... should i be printing first to a picture box then out to the printer?

4. when using a picture box, can i print a rich textbox into it? ex.) i have a rich textbox that has address info. say i want this in the upper left corner, i can print it to a x,y in the picture box and the contents of the box would go there??? or is there more involved?

tia everyone

Thinker
09-09-2003, 09:31 AM
1. If you just use the Print method, it automatically adds a vbCrLf to the
end so the CurrentY moves down one line and the CurrentX moves back
to the left side. If you add a ; at the end of your Print statement, it will
suppress the vbCrLf and leave the CurrentX immediately following what
was just printed.
2. You have to do all the calculations yourself but you can change the
scalemode to pixels.
3. Will probably have to use graphics methods.
4. If you want to keep the formatting of the richtext, the RTB will have
to do the printing. Fortunately, the RTB.SelPrint will accept an hDC as
the destination.

nsmoller
09-09-2003, 09:42 AM
thanks for the quick response... if the vbcrlf is there, the x goes to 0 and the y goes down one line u say - down one line by which measurement - textheight of last printed thing? so leaving off the ; would be beneficial, then i could just change the x if writing a text page..

i also assume you can't mix printing like rtb.selprint to a coordinate and printer.print to another...

thanks

Thinker
09-09-2003, 09:46 AM
Yes, TextHeight.

Not sure about mixing printing. Since it goes directly to the hDC, I doubt
CurrentX and CurrentY are involved. But you could probably leave blank
space in the RTB and print around it.

nsmoller
09-10-2003, 06:51 AM
thinker lended a hand yesterday when i asked about printing shapes, borders, tables, etc and said use graphics methods...

if anyone can elaborate or has other options using the Printer.Print or i guess even printing to a picture box?

do i have to add this picturebox to a form, and does it have to be dimensioned to the size of a paper (8.5x11)

how do you zoom if using the pic box as a preview window

thanks in advance

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum