Re: TextBox Value

Posted 28 April 2010 - 11:14 AM

keakTheGEEK, on 28 April 2010 - 09:44 AM, said:

Change .Value to .Text

If TextBox3.Text > TextBox2.Text Then
TextBox2.Text = " "
End If

I had this before , but its make my "casino roulette game" not correct.
If i have 2500 money then I'll put to bet 2500 then its going to " " yes.
If I'll bet 2499999999 then is able to bet show much or if i want bet 5 then its going to " " too. So i need a better solution for this.

Re: TextBox Value

Posted 28 April 2010 - 11:28 AM

Ah... So there's more.

Using .Text instead of .Value takes care of the compiler issue that you posted about. To make the logic of your game correct you need to convert the text values to a numerical value, otherwise you're just comparing the length of the strings. So, try this then

If Convert.ToInt32(TextBox3.Text) > Convert.ToInt32(TextBox2.Text) Then
TextBox2.Text = " "
End If

That will compare the numerical values in your text boxes. As for the logic of your application, you may want to create a separate thread for help on that.