Worked for me:
private void lblSide_DoubleClick(object sender, EventArgs e) {
plotSurface1.CopyToClipboard();
CopyClipboardToFile("test.jpg");
}
private bool CopyClipboardToFile(string bmpFilename) {
IDataObject d = Clipboard.GetDataObject();
Bitmap bmpImage;
if ((d != null) && (d.GetDataPresent(DataFormats.Bitmap))) {
bmpImage =
(Bitmap)(Clipboard.GetDataObject().GetData(DataFormats.Bitmap));
bmpImage.Save(bmpFilename, ImageFormat.Jpeg);
return true;
}
return false;
}
On Mon, Mar 2, 2009 at 8:05 AM, Thomas Erichsen <th...@th...> wrote:
> Hello again to the NPlot-team,
>
> I am currently wondering, how I could get the
> .CopyToClipboard()-Function to work. Is there any tutorial or example
> code available?
>
> thanks,
> Thomas
>
> --
> Dr. Thomas Erichsen
> Keplerstr. 108
> 45147 Essen
>
> Tel.: +49 (0)162 9436314
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Nplot-devel mailing list
> Npl...@li...
> https://lists.sourceforge.net/lists/listinfo/nplot-devel
>
--
___________________
Dav...@gm...
Lake Oswego, OR
801-473-9213
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|