Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

CW3DGraph to clipboard in vb.net

I spent a bit of time looking for that one and since I solved it I thought I might share the love.

So this is how you paste the image of a 3Dgraph onto the clipboard so that it can then be copied to any document:

 

Dim imgMF As Imaging.Metafile = CType(CWGraph3D1.ControlImage, Imaging.Metafile) Dim bm As New Bitmap(CWGraph3D1.Width, CWGraph3D1.Height) Dim gr As Graphics = Graphics.FromImage(bm) gr.DrawImage(imgMF, 0, 0, CWGraph3D1.Width, CWGraph3D1.Height) gr.Dispose() Clipboard.SetImage(bm)

 

Message 1 of 2
(3,559 Views)
thanks for sharing the info.
0 Kudos
Message 2 of 2
(3,536 Views)