Help
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
![]() |
![]() |
Help
How do i make it that when i press on a button in one Textbox is will give me a random number from 1-10.This is in VB6
...left for good
-
- Posts: 118
- Joined: Wed Mar 30, 2005 5:35 pm
Code: Select all
private sub command1_click()
text1.text = int(rnd * 10)
end sub
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
![]() |
![]() |
Yes i found it already on google.Tnx anyway.BUt i have another problem:
I want to make that if TextBox1 equals TextBox2 there will be a MessageBox.BUt som,ehow it doesn't work.
This is what i did:
I want to make that if TextBox1 equals TextBox2 there will be a MessageBox.BUt som,ehow it doesn't work.
This is what i did:
Code: Select all
If TextBox1.Equals(TextBox2 Then
MessageBox.Show("You have done it")
Else
MessageBox.SHow("Try again")
...left for good
-
- Posts: 118
- Joined: Wed Mar 30, 2005 5:35 pm
wat are u coding in?Patrickssj6 wrote:Yes i found it already on google.Tnx anyway.BUt i have another problem:
I want to make that if TextBox1 equals TextBox2 there will be a MessageBox.BUt som,ehow it doesn't work.
This is what i did:Code: Select all
If TextBox1.Equals(TextBox2 Then MessageBox.Show("You have done it") Else MessageBox.SHow("Try again")
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
![]() |
![]() |
-
- Posts: 118
- Joined: Wed Mar 30, 2005 5:35 pm
where the fuck u get that code it would be
Code: Select all
private sub command2_click()
if text1.text = text2.text then
msgbox("yea its equal")
else
msgbox("not equal =<")
endif
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
![]() |
![]() |
-
- Posts: 118
- Joined: Wed Mar 30, 2005 5:35 pm
make 2 text boxes and 2 command buttons in code section have thisPatrickssj6 wrote:well that code doesn't work for me.I have the express edition if this helps.But i try to change it to my version gimme a sec
Code: Select all
private sub command1_click()
text1.text and text2.text = int(rnd * 10)
end sub
private sub command2_click()
if text1.text = text2.text then
msgbox("yea its equal")
else
msgbox("not equal =<")
endif
end sub