Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TuToRiAl] How to make Offline (No Internet) Captcha (Human Confirmation) [TuToRiAl]
#5
(11-07-2010, 03:03 AM)ѕмии™ Wrote: You were right this is Nice Smile
Can I use this and add a dew changes I will give Credits Smile
Can we have a download for the Source over it did not work for me?

Umm... that was the source right there... Here is the whole code for form 1, right below:
Code:
Public Class Form1
    Dim charactersDisallowed As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,<>./?; :'{}[]=+-_)(*&^%$#@!~`|\uç▲ìα▲╜KÄ╤ZlÆ╘¦«¨©÷ ¢¡¬­®¯°±²³´µ¶·¸¹£¤¥»¼½¾¿"
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        KeyPreview = True
        Try
            Dim Random As New Random
            TextBox1.Text = Random.Next(TextBox2.Text)
        Catch ex As Exception
            MsgBox("Invalid Characters/No Numerical Value Detected", 16, "Fatal Error")
        End Try
        TextBox2.Visible = False 'This is what gives a digit limit for random captcha.
        TextBox1.Enabled = False 'Disables TextBox so User cannot copy and paste the captcha.
        TextBox1.ReadOnly = True 'Disables so user cannot edit the captcha.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Random As New Random
        TextBox1.Text = Random.Next(TextBox2.Text)
    End Sub

    Private Sub TextBox3_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
        If e.KeyCode = Keys.Enter Then
            Button3_Click(Nothing, Nothing)
        End If
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If TextBox3.Text = TextBox1.Text Then
            MsgBox("Captcha entered successfuly!", 64, "Human?")
            'Other Code should be put here if the user enters the captcha correctly, like Form2.Show()
        Else
            MsgBox("Your Kind is Not wanted Here, Robot!", 48, "Robot Detected!")
            'here add code that tells the user they have entered it incorrectly, I called them a robot for fun.
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub

    Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
        Dim theText As String = TextBox3.Text
        Dim Letter As String

        For x As Integer = 0 To TextBox3.Text.Length - 1
            Letter = TextBox3.Text.Substring(x, 1)
            If charactersDisallowed.Contains(Letter) Then
                theText = theText.Replace(Letter, String.Empty)
            End If
        Next
        TextBox3.Text = theText
        TextBox3.Select(TextBox3.Text.Length, 0)
    End Sub
End Class
[Image: t5BWm.png]
Reply


Messages In This Thread
RE: [TuToRiAl] How to make Offline (No Internet) Captcha (Human Confirmation) [TuToRiAl] - by Resistance - 11-07-2010, 11:11 AM
Response! - by Resistance - 08-30-2012, 10:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to display google captcha picture on form and add to textbox hit ok to bypass polas 0 1,265 09-14-2012, 01:59 PM
Last Post: polas
  [HELP]Tutorial/Learning System[HELP] norBATman 2 1,302 09-08-2012, 10:17 PM
Last Post: AceInfinity
  [VB.Net] Simple captcha class [Commented][Noob/Friendly] The-One 18 9,447 09-08-2012, 04:20 PM
Last Post: spesificrelax
  [Visual Basic] FTP Uploader [Tutorial] Coding Support 6 2,996 08-12-2012, 12:36 AM
Last Post: Kenneth
  [RELEASE]SF-TutPad "Tutorial Editor" [RELEASE] Digital-Punk 28 10,166 08-11-2012, 11:25 PM
Last Post: Kenneth

Forum Jump:


Users browsing this thread: 2 Guest(s)