How to add clock timer to listview column ?

You can talk about VB programming here

Postby BattleStar-Galactica » Mon May 14, 2007 5:31 pm


LOL :shock: :shock: :shock: :shock: :shock:
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby BattleStar-Galactica » Mon May 14, 2007 5:35 pm

see it now baby
Last edited by BattleStar-Galactica on Wed May 16, 2007 9:35 pm, edited 1 time in total.
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby autopilot » Tue May 15, 2007 7:49 am

method wrote:autopilot i wish i had visual basic 2005 edtion. So i don't know how to modify it for vb6!!!

Get VB2005 Express free from Microsoft. Download it here!

autopilot
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby BattleStar-Galactica » Tue May 15, 2007 10:02 am

one day vb6 programmers have to move to vbnet becuz microsoft won't support vb6. BTW autopilot why you do a lot of thing for nothing, the formula shown is so simple and can be used in vbnet or c#

example hour.ToString("00") ect
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby autopilot » Tue May 15, 2007 3:38 pm

BattleStar-Galactica wrote:BTW autopilot why you do a lot of thing for nothing, the formula shown is so simple and can be used in vbnet or c#

example hour.ToString("00") ect

Well... the reason is simple... didn't know i could do it that way :) Thanks for the tip

autopilot

What my timer became:[vb] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'increase sec by 1
sec += 1
'process sec
If sec > 59 Then
sec = 0
min += 1
s = "00"
Else
s = sec.ToString("00")
End If
'process min
If min > 59 Then
min = 0
hour += 1
m = "00"
Else
m = min.ToString("00")
End If
'process hour
h = hour.ToString("00")
'update the listview
ListView1.Items.Item(0).Text = String.Format("{0}:{1}:{2}", h, m, s)
End Sub[/vb]
Last edited by autopilot on Tue May 15, 2007 3:46 pm, edited 1 time in total.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby method » Wed May 16, 2007 7:49 pm

Batler thank you for the project. But timer doesn't go beyond one min!! In other word it doesn't show mins and hours!!
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Postby BattleStar-Galactica » Wed May 16, 2007 9:35 pm

Sorry for that, I didn't run the program, just do copy and past what I posted on here, now I run it and see an error of logic

just redownload the project here, it's will ok
Attachments
methodtimer.zip
(1.38 KiB) Downloaded 51 times
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Previous

Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests