Taking an image snapshot of a C# WinForm App

B

Bill Fuller

Is there any way to create a self-image of an active C# WinForm app (similar
toAlt-PrintScreen)? I would like to add this feature to a user feedback form
where an image of the active application will automatically be created and
persisted on the backend for support purposes.
 
N

Nicholas Paldino [.NET/C# MVP]

Bill,

If you have a reference to the Form instance, then you can call the
DrawToBitmap method on the Form instance (or for that matter, any Control
instance, since that's where the method is defined, Form just inherits it)
and then draw the contents of the Control/Form to the bitmap that you pass
in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top