|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Metafile issueI 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. It's okay, this problem was resolved.
Show quoteHide quote "NickP" <n***@nick.com> wrote in message news:OEmt623IHHA.3676@TK2MSFTNGP03.phx.gbl... > 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. > "NickP" <n***@nick.com> wrote: Could you say how the problem was resolved, please? I'm curious.>> 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. >It's okay, this problem was resolved. -- Lucian
Retrieving Values from Dynamically Created Controls
Dynamically load a form Raising an event from a user control Changing file name Determine if app fails... Detect Multiple Keystrokes? converting minutes into hrs mins VS2005 Upgrade Question Borderless Form regular expression used to conver to upper case |
|||||||||||||||||||||||