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
Results 1 to 5 of 5
Thread: [Vb.net] Screen Captcha
- 04 Jan. 2010 12:44am #1
[Vb.net] Screen Captcha
Last edited by Eternal Darkness; 04 Jan. 2010 at 03:43am.
- 04 Jan. 2010 03:05am #2
- 04 Jan. 2010 03:44am #3
- 09 Jan. 2010 06:17pm #4
Why don't you make an OCR its not hard loading a picture lol.
- 10 Jan. 2010 12:00am #5