Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not System.Windows.Forms.Clipboard.GetDataObject() Is Nothing Then
Dim oDataObj As IDataObject = System.Windows.Forms.Clipboard.GetDataObject()
If oDataObj.GetDataPresent(System.Windows.Forms.DataFormats.Bitmap) Then
Dim oImgObj As System.Drawing.Image = oDataObj.GetData(DataFormats.Bitmap, True)
' 保存为 BMP\JPG\GIF 格式
oImgObj.Save("c:\Test.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
oImgObj.Save("c:\Test.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg)
oImgObj.Save("c:\Test.gif", System.Drawing.Imaging.ImageFormat.Gif)
End If
End If
End Sub