Add a button and name it : Captcha (Make this its Text as well)
Add a button and name it : cmdSave (Make the text "Save")
Add a button and name it : cmdEnd (make the Text "End" / "Exit")
Add a picture box and name it : Screenshot_Box
It will look something like :PHP Code:
Private Sub Captcha_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Captcha.Click
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
Screenshot_Box.Image = screenshot
End Sub
Private Sub CmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSave.Click
Dim save As New SaveFileDialog
Try
save.Title = "Save File"
save.FileName = "*.jpg"
save.Filter = "Jpeg |*.jpg"
If save.ShowDialog() = DialogResult.OK Then
Screenshot_Box.Image.Save(save.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
End If
Catch ex As Exception
'Do Nothing
End Try
End Sub
Private Sub cmdEnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdEnd.Click
End
End Sub
http://i46.tinypic.com/216240.jpg