Printer or PictureBox by same routine

  • Thread starter Thread starter active
  • Start date Start date
A

active

I have a VB6 app that is being converted to VB.NET. It contains a routine
(large) that is sometimes called with a PictureBox and sometimes with a
Printer. I think it was common in VB6 to use the same routine to display
and then to print.

I wonder if someone would take the time to simply outline the way that is
done in VB.NET. Just a few words to give direction to proceed.


Thanks,
Cal
 
There is a lot of structure that I'd like not to redo.

I was hoping I could send the routine a bitmap for the screen or a bitmap
for the printer - or something like that.

The program is all set up to call the routine for screen display or call it
for print. Would like to not change too much.



Thanks
Cal
 
In the VS.NET 2003 resource kit, there is a sample project called Windows Forms - Simple Printing. You may want to look at it to see what completely different resources are available to you in VB.NET. It seems that sometimes, upgrading complicated code from VB6 to VB.NET may not be the best idea.

Specifically, look at the pdoc_PrintPage SUB. It is very interesting
 
Is the resource kit on the VS.Net installation disks or is that another
product?
I'm moving and the disks are packed.

Thanks for the info
I'm going to search MSDN for it.

Cal


Garry said:
In the VS.NET 2003 resource kit, there is a sample project called Windows
Forms - Simple Printing. You may want to look at it to see what completely
different resources are available to you in VB.NET. It seems that sometimes,
upgrading complicated code from VB6 to VB.NET may not be the best idea.
 
The example helped a lot. Turns out that what I need to do is quite simple.
I one case I give the routine a Graphics object that I got from the
picturebox and in the other I give it the Graphics object I got from the
printpage argument.

Displays either in the picturebox or on the printer

Thanks
Cal




Garry said:
In the VS.NET 2003 resource kit, there is a sample project called Windows
Forms - Simple Printing. You may want to look at it to see what completely
different resources are available to you in VB.NET. It seems that sometimes,
upgrading complicated code from VB6 to VB.NET may not be the best idea.
 
Back
Top