How do I Print a .wmf image?

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
 
H

Hal Gibson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top