Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-12-2007, 05:54 AM   #1
Bogan
 
Neodude112320's Avatar
 
Join Date: Feb 2006
Location: Australia
Posts: 8,471
Send a message via MSN to Neodude112320
Default BASIC Boolean help


If total.Value = 1073741824 Then tb.Text = "test"


What i want this to do,is when TOTAL reaches 1073741824 it will change the text in the text box,Why isnt this working? it will run no problem it just wont change the text box.
__________________

__________________
Desktop:BitFenix Survivor~Gigabyte GA-P67A-UD3R~ i7 2600K @ 4hz~AMD 6870 1GB~12gb Team Elite DDR3 1333~3xWD In RAID5~W7 Ult
Laptop:Alienware M11x~ i7-2637M 1.7GHz~16GB 1333MHz DDR3~GeForce GT 540M~W7 Ult
Neodude112320 is offline   Reply With Quote
Old 11-12-2007, 07:52 AM   #2
Daemon Poster
 
xtremezx2's Avatar
 
Join Date: Sep 2006
Posts: 915
Default Re: BASIC Boolean help

do you have it in a looping structure and incremented??

what language are you doing this in a maybe a little more of the program so that I can see what your trying to do. It's not working because the if statement never sees that value.
__________________

xtremezx2 is offline   Reply With Quote
Old 11-12-2007, 05:15 PM   #3
Bogan
 
Neodude112320's Avatar
 
Join Date: Feb 2006
Location: Australia
Posts: 8,471
Send a message via MSN to Neodude112320
Default Re: BASIC Boolean help

Im using Visual studio 2005 (Visual basic),What is a looping structure (Im still teaching myself basic)?
__________________
Desktop:BitFenix Survivor~Gigabyte GA-P67A-UD3R~ i7 2600K @ 4hz~AMD 6870 1GB~12gb Team Elite DDR3 1333~3xWD In RAID5~W7 Ult
Laptop:Alienware M11x~ i7-2637M 1.7GHz~16GB 1333MHz DDR3~GeForce GT 540M~W7 Ult
Neodude112320 is offline   Reply With Quote
Old 11-12-2007, 05:41 PM   #4
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: BASIC Boolean help

HAve you tried 1073741824 in quotes, otherwise it could be looking for 1073741824 as a variable

If total.Value = "1073741824" Then tb.Text = "test"

And I assume this is with a loop that is incremeting total somehow untill it will reach the desired number?
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 11-12-2007, 05:55 PM   #5
Bogan
 
Neodude112320's Avatar
 
Join Date: Feb 2006
Location: Australia
Posts: 8,471
Send a message via MSN to Neodude112320
Default Re: BASIC Boolean help

Nope,that didnt work neither,I think you might be rigt there,although i have it running here:

Quote:
PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
total.Value = bytes.RawValue
TextBox1.Text = bytes.RawValue
If total.Value = 1073741824 Then
tb.Text = "test"
EndIf

EndSub
So every ten miliseconds its checking the value,so maybe i am running it in a loop? Im still a newb at visual basic.
__________________
Desktop:BitFenix Survivor~Gigabyte GA-P67A-UD3R~ i7 2600K @ 4hz~AMD 6870 1GB~12gb Team Elite DDR3 1333~3xWD In RAID5~W7 Ult
Laptop:Alienware M11x~ i7-2637M 1.7GHz~16GB 1333MHz DDR3~GeForce GT 540M~W7 Ult
Neodude112320 is offline   Reply With Quote
Old 11-13-2007, 05:25 PM   #6
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: BASIC Boolean help

Quote:
Originally Posted by neodude112320 View Post
Nope,that didnt work neither,I think you might be rigt there,although i have it running here:



So every ten miliseconds its checking the value,so maybe i am running it in a loop? Im still a newb at visual basic.
Is that all of your code? where is the function being called from?
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 11-13-2007, 05:47 PM   #7
Bogan
 
Neodude112320's Avatar
 
Join Date: Feb 2006
Location: Australia
Posts: 8,471
Send a message via MSN to Neodude112320
Default Re: BASIC Boolean help

Here is the full script.
Quote:
ublic Class form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

total.Value = 1073741824
End Sub



Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
total.Value = bytes.RawValue
TextBox1.Text = bytes.RawValue

If total.Value >= 1073741824 Then
tb.Text = "test"
End If


End Sub
End Class
__________________

__________________
Desktop:BitFenix Survivor~Gigabyte GA-P67A-UD3R~ i7 2600K @ 4hz~AMD 6870 1GB~12gb Team Elite DDR3 1333~3xWD In RAID5~W7 Ult
Laptop:Alienware M11x~ i7-2637M 1.7GHz~16GB 1333MHz DDR3~GeForce GT 540M~W7 Ult
Neodude112320 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0