EvilZone

Programming and Scripting => .NET Framework => : iiCE June 21, 2015, 01:58:01 AM

: [VB] Get Screenshot
: iiCE June 21, 2015, 01:58:01 AM
Simple Screenshot application.

:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim Img As New Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height)
        Dim g As Graphics = Graphics.FromImage(Img)
        g.CopyFromScreen(0, 0, 0, 0, Img.Size)

        Img.Save("image.jpg")

        g.Dispose()
        Me.Close()

    End Sub
End Class

Enjoy :-P