Taking Screen Shot .net

Discussion in 'Programming General' started by dodge, Apr 25, 2007.

Taking Screen Shot .net
  1. Unread #1 - Apr 25, 2007 at 9:43 AM
  2. dodge
    Joined:
    Mar 26, 2007
    Posts:
    125
    Referrals:
    1
    Sythe Gold:
    5

    dodge Active Member
    Banned

    Taking Screen Shot .net

    Here is a very simple code to take screen shots in vb.net, you can also change this code to take only the window or even a control in the form in wan to do so

    Code:
            Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
            Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
            Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(screenGrab)
            g.CopyFromScreen(New Point(0, 0), New Point(0, 0), ScreenSize)
            screenGrab.Save("C:\screenGrab.bmp")
            'or screenGrab.Save("C:\screenGrab.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
    this code was taking from the planet planetsourcecode.com
     
  3. Unread #2 - Apr 25, 2007 at 10:47 AM
  4. speljohan
    Joined:
    Apr 24, 2005
    Posts:
    1,450
    Referrals:
    3
    Sythe Gold:
    0

    speljohan Guru
    Visual Basic Programmers

    Taking Screen Shot .net

    great :) i will find plenty of use for this. Very nice and simple system in .net.
     
< Help about c++. | Need a prof help in C++ >

Users viewing this thread
1 guest


 
 
Adblock breaks this site