how can i take picture from my form ?

  • Thread starter Thread starter miladhatam
  • Start date Start date
hi
how can i take a picture from my form and how can i save it ?

thanks a lot

It would help us help you if you could provide some context and details.
What type of form are you referring to (Windows, web, WPF, something else)?
Are you using Visual Studio? If so, what version?
Are you attempting to "take a picture from my form" as a software user or
programmatically?
Without more information from you, a useful answer is pretty much
impossible.
 
oh ok
i'm using visual studio .net , frame work 2.0 platform and in c#
language
this program is windows application and i want to take a picture from
my form programmatically
i think i should do that with API codes but i don't know how
 
While your form in the active window (that is, run your application, show
the form), press ALT+Print Screen. At this point of time, the active
Window's image is saved to windows' clipboard. Then you can open your
favorite image process program, such as Paint, abd paste (Ctrl+V) to it and
save the image to whatever type of file the program can. Of course you can
literally "take a picture" of your app's form by using a camera aiming at
your computer's screen :(.
 
Look into Graphics class in System.Drawing namespace. It has a method called
CopyFromScreen(), which is most screen capter programs written with .NET use
to capture screen image into an Image object. There are a few .NET code
samples float around. Simply google "CopyFromScreen()" would bring quite
some sample code to you.
 
Back
Top