Thanks, Dave! That works a lot better than mine!

Mike


Dave Thayer wrote:
I
On Fri, Oct 28, 2016 at 11:28 AM, Mike Copeland <m...@ggisoft.com> wrote:
Man-wai Chang wrote:
Is there a VFP function that does it? Win32API needed?
Here's what I use. It creates a snapshot of the entire screen and saves it
as "error.emf" which is a bit-map format that compresses extremely well.
[...]

f you don't mind pulling GDIPlusX, into your program, you can do something like:

* Screengrab cf <http://www.mail-archive.com/profox@leafe.com/msg56529.html>
                 If Type("_Screen.ActiveForm") = "O"
                     Do System.App
                     loBmp =
_Screen.System.Drawing.Bitmap.Fromscreen(_Screen.ActiveForm.HWnd)
                     loBmp.Save(lcErrDir + "offending_form.png",
_Screen.System.Drawing.Imaging.ImageFormat.Png)
                     loBmp.Dispose()
                     lcAttachmentList = lcAttachmentList + CRLF +
lcErrDir + "offending_form.png"
                 Endif

As you can see, I stole\W was inspired by a post by Christof
Wollenhaupt back in 2008.

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/0326137f-9b9c-7079-50f6-3d0540b32...@ggisoft.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to