You are viewing our Forum Archives. To view or take place in current topics click here.
Question For A VB.Net Program
Posted:

Question For A VB.Net ProgramPosted:

ImHacking
  • Junior Member
Status: Offline
Joined: Aug 04, 201212Year Member
Posts: 89
Reputation Power: 3
Status: Offline
Joined: Aug 04, 201212Year Member
Posts: 89
Reputation Power: 3
In vb I want to make a button change the text every time it is clicked, I'm using this to make a keygen.

I have tried this but you can only have the text change twice:

Public Class Form1

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "14300038404-BCVG-ZPGH-FDXP-MPFP" Then
            TextBox1.Text = "14300098232-ZLKX-DSKZ-ZWBN-CRMK"
        Else
            TextBox1.Text = "14300038404-FGYK-GJGC-FHJK-MPFP"
        End If
    End Sub
End Class
#2. Posted:
GameDev14
  • Junior Member
Status: Offline
Joined: Jan 10, 201410Year Member
Posts: 80
Reputation Power: 3
Status: Offline
Joined: Jan 10, 201410Year Member
Posts: 80
Reputation Power: 3
Using the case statement allows you to do multiple click with a button

Example:
Select Case Index
Case 0
TextBox1.Text="Code1"
Case 1
TextBox1.Text = "Code2"
Case 2
TextBox1.Text = "Code3"
#3. Posted:
EvanLB7
  • TTG Senior
Status: Offline
Joined: Apr 21, 201212Year Member
Posts: 1,336
Reputation Power: 65
Status: Offline
Joined: Apr 21, 201212Year Member
Posts: 1,336
Reputation Power: 65
Are you wanting it to generate user input information or a random character number combination.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.