You are not logged in.

XelaisPWN

Beginner

  • "XelaisPWN" started this thread

Posts: 2

Date of registration: Apr 10th 2009

  • Send private message

1

Friday, April 10th 2009, 6:27am

Making a clock?

Hello, all, i'm really new at this whole Jabaco thing. I've been learning Visual Basic 6 for the past month or so, and I'm starting to get the hang of it. That's why I got Jabaco-to practice visual basic 6.
but enough about my history. For some reason, the code I learned a long time ago for making a digital clock doesn't work.

Jabaco Source

1
2
3
4
5
6
7
8
Public Sub Form_Load()
   Timer1.Enabled=True
   Timer1.Interval=1000
End Sub

Public Sub Timer1_Timer()
   label1.Caption=Time
End Sub

Label 1 ends up blank, though. This code always worked before in visual basic, so, can anyone help?

maXim

Trainee

  • "maXim" is male

Posts: 53

Date of registration: Jan 5th 2009

Location: Sesto Fiorentino, Florence (ITALY)

Occupation: design & development (HW, SW & FW)

Hobbies: chess, fly fishing, good wine and beautiful women!

  • Send private message

2

Friday, April 10th 2009, 7:46am

Hi XelaisPWN,

Jabaco is a project still under development and some functions don't result operational, but I'm sure that Manuel will make them available in the next version. For now I have resolved as follows:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
Public Sub Form_Load()
   Timer1.Interval = 1000   
   Timer1.Enabled = True  
End Sub
Public Sub Timer1_Timer()
   Label1.Caption = Time
   Label1.Refresh   
End Sub
Public Function Time() As String
   Dim xs(0 To 1) As String
   xs() = Split(CStr(Now), " ")
   Time = xs(1)
End Function

... :whistling: this is not the best solution but works... ;)

XelaisPWN

Beginner

  • "XelaisPWN" started this thread

Posts: 2

Date of registration: Apr 10th 2009

  • Send private message

3

Friday, April 10th 2009, 11:27pm

Oh, I see! It's 24-hour time, but that should be really easy to fix! Thank you so much!

Rate this thread
WoltLab Burning Board