|
-
Feb 22nd, 2002, 10:26 AM
#1
Thread Starter
New Member
Old Style Printer.hDC
Hi All,
I need to print the contents of a 3rd Party imaging control. In vb6 I could do this -
myControl.prnHDC = Printer.hDC
myControl.PrintImage
Printer.EndDoc
Any ideas how I can do this in .NET.
The .NET SDK tells me the old Printer.HDC property is no longer needed because the PrintDocument class is a device context itself.
I can't seem to find a way to hook the image data to the Graphics object either. If I do this -
myControl.hDC = e.Graphics.GetHDC
The IDE tells me it cannot convert a System.IntStr to an Integer. All of myControl's hdc properties are Integers.
Any help is greatly appreciated.
TIA
-
Feb 25th, 2002, 05:00 AM
#2
I think you mean IntPtr and not IntStr. You must have Option Strict On, which is a good thing though. This means you must explicitly convert the IntPtr to an integer, because implicit conversions are not allowed.
Try someting like this:
myControl.hDC = e.Graphics.GetHDC.ToInt32
-
Feb 25th, 2002, 10:51 AM
#3
Thread Starter
New Member
Yes..I meant IntPtr (as you pointed out)
I'll give your advice a try.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|