Instead of "Button1" it should be Button1.text /me
[Help]Textbox
Your code is saying
textbox 1 2 and 3 must equal "button1"....
The text "button1" not what it generates
textbox 1 2 and 3 must equal "button1"....
The text "button1" not what it generates
Yes, but the code you put is for the text of button1 not what it generates.
I do not see how your not understanding this.
This is the simplest way I can put it
"If textbox has button1 (The word its self) then it would be correct"
I cannot help you if you don't understand this...
I do not see how your not understanding this.
This is the simplest way I can put it
"If textbox has button1 (The word its self) then it would be correct"
I cannot help you if you don't understand this...
dude u have no idea wdf u talkin bout every thing works if i remove
the button1 when it is CLICKED 4 RANDOM NUMBERS APPEAR IN TEXTBOX 1 2 3
u want me to send u the fkin code an i will remove the else msgbox invalid code . an show u it works ? dude gtfo
Originally Posted by TOP-CENT
i got every thing to gen but i want it if theres no numbers in the 3 textboxs then i want it to say INVALID CODE
Code:
else
msgbox("invalid code")
u want me to send u the fkin code an i will remove the else msgbox invalid code . an show u it works ? dude gtfo
the code i gave u will not msgbox login sucessfull unless it is the same numbers were generated
but here is the code to check if textbox doesn't contain numbers
dude i can hardly understand what u want
but here is the code to check if textbox doesn't contain numbers
Code:
If TextBox1.Text = "" Or TextBox2.Text = "" Or Textbox3.Text = "" Then
Msgbox("Register Failed or whatever")
Else
Msgbox("Sucesfully Registerd or whatever")
End If
things within quotes = String.
Msgbox("Button1") will make a messagebox displaying "Button1". This value is STATIC.
However if you do
Msgbox(Button1.Text)
It will display button1's label.
If you do not understand, get out of the section and don't come back until you have at least tried to learn
Msgbox("Button1") will make a messagebox displaying "Button1". This value is STATIC.
However if you do
Msgbox(Button1.Text)
It will display button1's label.
If you do not understand, get out of the section and don't come back until you have at least tried to learn

i didn't understand most of the thread but what i think u trying to do is by clicking button1 it genrates random number and when click button2 it checks if the random number is the same (the user didn't change the random number?)
so i don't get the point of this but
just change the code of msgbox to whatever and do what ever then
so i don't get the point of this but
Code:
Dim Random As New Random
Dim Check(2) As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Check(0) = Random.Next(1000) : Check(1) = Random.Next(6000) : Check(2) = Random.Next(50)
TextBox1.Text = Check(0) : TextBox2.Text = Check(1) : TextBox3.Text = Check(2)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = Check(0) AndAlso TextBox2.Text = Check(1) AndAlso TextBox3.Text = Check(2) Then
MsgBox("Login Succesfully")
Form4.Show()
Else
MsgBox("Failed To Register")
End If
End Sub
Have you even bothered entering Button1 three times? If not then please don't ask for help again. If you refuse to use it.
Sweet christ this guy is retarded. Seriously, people have said time and time again to look at your fucking code. Your "IF" statment tests whether each textbox equals the STRING LITERAL "Button1", clearly a random NUMBER will not == "Button1" derp derp. Stop telling everyone else they are wrong because you can't admit that your code is wrong.
You used to many big words witch scares him so he won't understand you
I gave him the answer...so I say close.. he chooses to not listen to other people on a help forum that is the reason
"you can't say I need help plz and ignore people trying to help you (with the correct answer)" its just not right
I gave him the answer...so I say close.. he chooses to not listen to other people on a help forum that is the reason
"you can't say I need help plz and ignore people trying to help you (with the correct answer)" its just not right
Why do i get the distinct feeling most of his code is leeched.
haha if it was leeched just like that in the code it show work with no problem an everything u guys said was way off i got it to work way easy then u guys try to explain it fail /close an all i had to do was like i said remove else invaild code an replace it with else register sucsessful bcz if i got the numbers random then there should be no invaild code @Jason @master /close plz
This thread is closed for replies.

