Printing model in VB.NET doesn't match my needs

  • Thread starter Thread starter SamSpade
  • Start date Start date
S

SamSpade

I have a VB6 app that I'm converting. At various places in the program it
might be writing to a Textbox and also prints the text. Or someplace else,
it may ask the user something and depending on the reply print something.
I.e., the printing is dispersed among the logic of the program.

All the printing samples I've looked at have the printing code collected in
one place. I don't know how I can do that. I need to open a document, print
from wherever and when finished close the document.

Can I do that somehow?


Cal
 
* " SamSpade said:
I have a VB6 app that I'm converting. At various places in the program it
might be writing to a Textbox and also prints the text. Or someplace else,
it may ask the user something and depending on the reply print something.
I.e., the printing is dispersed among the logic of the program.

All the printing samples I've looked at have the printing code collected in
one place. I don't know how I can do that. I need to open a document, print
from wherever and when finished close the document.

Why not "collect" everything you want to print in an appropriate
datastructure and then print everything at once?
 
Why not "collect" everything you want to print in an appropriate
datastructure and then print everything at once?


I guess I could do that. For each print command I'd have to save the font,
position on the page and text. There are also some lines drawn. As I think
about it ,it seems doable. The big drawback is that I would accommodate only
a subset of the things a graphics object could do. Be nice if I could come
up with a general approach

What about a bitmap with the same resolution as the printer. Think that
would work? Except now the page would get downloaded as graphics. I expect
Windows sends text to the printer but maybe it always print by sending
graphics. Do you know?

I know very little about Metafiles. I wonder if that would be worth
investigating. If a metafile is full of text does it get sent to a printer
as text or graphics?

I was hoping someone would tell me about a class that could be used for
printing much as the VB6 printer object was. No such luck so far but I'm
still hoping

Any constructive suggestions of what direction to study and/or which will
probably not be fruitful at all will be appreciated,
Cal
 
Back
Top