It's from a J# (not .NET) Graphics2D object. The only way to get the bitmap
"Ben Voigt" wrote:
> "David Thielen" <thielen@nospam.nospam> wrote in message
> news:E50F3CF8-684D-4C61-B1B6-0C7B76EF4C2F@microsoft.com...
> > That's what I was afraid of - thanks. (I dislike P-Invoke because we're
> > all
> > supposed to be 100% managed code.)
>
> Don't know why you'd need P/Invoke here. Do you know where the Graphics
> object came from? If it's from an exposed window onscreen, use the
> CopyFromScreen method to get it into a Bitmap. If it's from another Image
> (Bitmap/Icon/Metafile, etc) you can use that Image directly or use
> DrawImage. If the Graphics object is to an obscured window (another window
> overlaps it) or a DirectX surface, then BitBlt isn't going to get you the
> data either, because it isn't in any GDI buffer.
>
> >
> > --
> > thanks - dave
> > david_at_windward_dot_net
> >
http://www.windwardreports.com > >
> >
> >
> > ""Peter Huang" [MSFT]" wrote:
> >
> >> Hi
> >>
> >> I think we need to create a graphics from the Bitmap, so the following
> >> drawing will be on the Bitmap.
> >> Create from an Image Object
> >>
http://msdn2.microsoft.com/en-us/library/5y289054.aspx > >>
> >> If you means an existing graphics, I think you have to P/Invoke the
> >> BitBlt
> >> GDI function.
> >> Here is a link for your reference.
> >>
> >> Screen Capturing a Form in .NET - Using GDI and GDI+
> >>
http://www.c-sharpcorner.com/Graphics/ScreenCaptFormMG.asp > >>
> >>
> >> Best regards,
> >>
> >> Peter Huang
> >>
> >> Microsoft Online Community Support
> >> ==================================================
> >> When responding to posts, please "Reply to Group" via your newsreader so
> >> that others may learn and benefit from your issue.
> >> ==================================================
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
>
>