How do I Print a .wmf image?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I Print a .wmf image

What I eventually need to do is print text over a pre-rendered Windows Metafile Image

I need to combine formatted text with the .wmf file in one print operation

I'm able to do this in vb6 but get an invalid image type in .Ne

Any help would be greatly appreciated
 
There is a bug in the release version of VB.Net that causes a run-time
exception when you specify a .WMF file in the PictureBox image property
using the Windows Form Designer - "An unhandled exception of
Type)'System.InvalidCastException' occurred in PrntDemo.exe
Additional information: Specified cast is not valid."

I had to change the windows generated code from "Me.picRCMSRP01.Image =
CType(Resources. GetObject("picRCMSRP01.Image"),
System.Drawing.Imaging.Metafile)"
to "Me.picRCMSRP01.Image =
CType(Resources.GetObject("picRCMSRP01.Image"), System.Drawing.Bitmap)"
to get it to work - even though it is in fact a .wmf file...WEIRD!

--Hal
 
Back
Top