I'm trying to make a stopwatch, but it ain't really working out..
So if you have some VB knowledge, please help me:
Visually:
Code:
<3,
twelve
Code: Select all
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format(Val(Label1.Caption) + 0.01, "fixed")
End Sub
Innovacious wrote:well, i just made a simple form with a label a timer and a button.
Used your code and it workedCode: Select all
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format(Val(Label1.Caption) + 0.01, "fixed")
End Sub
although your interval is wrong on your timer, 1000 is a second. If your doing milliseconds in that format then thats still wrong, should be 10 i think (unless its dif in vb.net)
edit: ooohyou must be doing it in milliseconds cus there arnt 100 seconds in a min, lol
ANOTER edit: your errors seem to be with the label. Have you named it right?
I FOUND THE SOLUTION
youre using vb 6 code. in vb.net they replace .caption with .text for some stupid reason
Innovacious wrote:TwelveEleven wrote:Ok, thanks. But i'm using vb 2008 beta 2 since you're wondering. Thanks for that though<3 i'll see if it works now
Lol, i really should upgrade to a newer version of vb shouldnt i
TwelveEleven wrote:Innovacious wrote:TwelveEleven wrote:Ok, thanks. But i'm using vb 2008 beta 2 since you're wondering. Thanks for that though<3 i'll see if it works now
Lol, i really should upgrade to a newer version of vb shouldnt i
guess so, minor question. When i 'build' something, where can i find the build file? (as in where does it save to?)
Innovacious wrote:I FOUND THE SOLUTION
youre using vb 6 code. in vb.net they replace .caption with .text for some stupid reason
micheal_safian wrote:![]()
![]()
![]()
man read the error man the line u wrote the Label class doesn't got Caption property use instead Label1.Text property.As the caption property has changed in VB.net to Text property ....