N
NickP
Hi there,
I am obtaining a meta file from the clipboard via the following code
Dim CF_ENHMETAFILE As Integer = 14
Dim cMFeImage As Imaging.Metafile
Dim pIPrClipboard As IntPtr = OpenClipboard(Me.Handle)
If (IsClipboardFormatAvailable(CF_ENHMETAFILE)) Then
Dim pIPrData As IntPtr = GetClipboardData(CF_ENHMETAFILE)
cMFeImage = New Imaging.Metafile(pIPrData, False)
Call cMFeImage.Save("c:\pop.emf", Imaging.ImageFormat.emf)
End If
Call CloseClipboard()
If I display the image in a picture box and redraw it during resize it
looks great, definitely an EMF, but the saved image "pop.emf" is not an
EMF, more like a JPEG, it's been rasterised somewhere along the lines and
now looks awful.
Any ideas what's happening?
If you open a spreadsheet in excel and copy a chart to the clipboard you
can use that. Again, looks great in VB, but not when saved.
BTW, I have tried seeing the 2nd property of the MetaFile constructor to
True / False, same thing happens.
Many thanks in advance.
Nick.
I am obtaining a meta file from the clipboard via the following code
Dim CF_ENHMETAFILE As Integer = 14
Dim cMFeImage As Imaging.Metafile
Dim pIPrClipboard As IntPtr = OpenClipboard(Me.Handle)
If (IsClipboardFormatAvailable(CF_ENHMETAFILE)) Then
Dim pIPrData As IntPtr = GetClipboardData(CF_ENHMETAFILE)
cMFeImage = New Imaging.Metafile(pIPrData, False)
Call cMFeImage.Save("c:\pop.emf", Imaging.ImageFormat.emf)
End If
Call CloseClipboard()
If I display the image in a picture box and redraw it during resize it
looks great, definitely an EMF, but the saved image "pop.emf" is not an
EMF, more like a JPEG, it's been rasterised somewhere along the lines and
now looks awful.
Any ideas what's happening?
If you open a spreadsheet in excel and copy a chart to the clipboard you
can use that. Again, looks great in VB, but not when saved.
BTW, I have tried seeing the 2nd property of the MetaFile constructor to
True / False, same thing happens.
Many thanks in advance.
Nick.