Instead of "Button1" it should be Button1.text /me
Your code is saying
textbox 1 2 and 3 must equal "button1"....
The text "button1" not what it generates
Last edited by willrulz188; 04-13-2011 at 07:10 PM.
Question ALL statements! ?[img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]You're in denial that you're in denial. ?
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...
Question ALL statements! ?[img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]You're in denial that you're in denial. ?
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
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 thenCode: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
Last edited by T0P-CENT; 04-13-2011 at 09:47 PM. Reason: changing vb tags
dude u have no idea wdf u talkin bout every thing works if i removethe button1 when it is CLICKED 4 RANDOM NUMBERS APPEAR IN TEXTBOX 1 2 3Code: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
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 CODEOriginally Posted by TOP-CENT
PlayStation ID:Boxing509
Originally Posted by pushdis15
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 wantCode:If TextBox1.Text = "" Or TextBox2.Text = "" Or Textbox3.Text = "" Then Msgbox("Register Failed or whatever") Else Msgbox("Sucesfully Registerd or whatever") End If
Last edited by T0P-CENT; 04-13-2011 at 10:59 PM.
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.
willrulz188 (04-14-2011)
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
Question ALL statements! ?[img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]You're in denial that you're in denial. ?
Why do i get the distinct feeling most of his code is leeched.
"I don't believe in an afterlife, so I don't have to spend my whole life fearing hell, or fearing heaven even more. For whatever the tortures of hell, I think the boredom of heaven would be even worse." - Isaac Asimov
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
PlayStation ID:Boxing509
Originally Posted by pushdis15
willrulz188 (04-14-2011)