Hi,

I am currently writing some code which copies an image in
the Windows metafile format pasted on the clipboard into a
picturebox control. For some reason, I have not been able
to get the following code to work:

Dim od As IDataObject = Clipboard.GetDataObject()
If (od.GetDataPresent(DataFormats.MetafilePict))
Then
PictureBox1.Image = CType(od.GetData
(DataFormats.MetafilePict, True), Metafile)
End If

When I switch the formats to Bitmap, everything works
fine, but when I use the EnhanceMetafile or the
MetafilePict formats, I get a blank picturebox.

I have been reading on the net about how there is a bug in
the framework with regards to metafile formats on the
clipboard but I don't know enough about the native API
calls to make heads or tails of it.

Any help would be appreciated.

Victor