[Mono-list] screen capturing in mono

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Feb 28 15:08:58 EST 2007


Hello Eric,

On Wed, 2007-02-28 at 11:45 -0700, Eric Morgan wrote:
> Hi all,
> 
> Is there a good way to capture screens or something similar in mono? 

When using the 2.0 profile you can use the CopyFromScreen method from
System.Drawing.Graphics.

>  In our .NET application, we have custom controls, and we basically
> create a graphics object from it, make a new bitmap, then do a bitblt
> to get it into the bitmap.  This requires a P/Invoke into gdi32.dll,
> which obviously blows up in mono.  Is there a good way to do this
> using mono?  Some other library maybe?
> 
> I've tried installing wine and using the gdi32.dll.so that comes with
> it, but I don't know if I'm using it correctly or not.  It can find
> the library, but it gives a SIGSEGV while trying to execute the bitblt
> operation.  Seemed like kind of a hack, 

It is.

> and I didn't really expect it to work... 

me neither ;-)

>  Do I need other libraries along with the gdi32.dll.so ?
> 
> Any advice is appreciated.  Thanks.
> 
> Eric Morgan
> Renegade Geophysics
> 303-661-0400, x2
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/



More information about the Mono-list mailing list