Lost Password?

  #1 (permalink)  
Old 01-04-2007, 01:53 AM
AfTriX AfTriX is offline
Programming God
 
Join Date: Jan 2007
Location: Sri Lanka
Posts: 596
Rep Power: 0
AfTriX is an unknown quantity at this point
Default Creating a Clock

Start of by creating a standard .exe project

now make one label and one timer

name them:
label: lblTime
timer: tmrTimer

now add

Option Explicit

to the code

now we need to use the form_load event to start the clock:
we do this by first adding the code:

Private Sub Form_Load()

End Sub

to the code and now we add the line lblTime.Caption = Time between them to sett the label to the local system time
but we also need to sett the interval of the timer
do this by adding the code:

tmrTimer.Interval = 1000
on the next line (still inside the form_load event)

now we need to ad a update event
add the code:

Private Sub tmrTimer_Timer()

End Sub

outside of the form_load event
now we can add code that will be executed then each time the timer reaches 0

add the code:

lblTime.Caption = Time
inside the tmrTimer_Timer event

now you got a basic digital clock

hope this sums it up
happy coding!!!



Ref:
Photoshop Tutorials and Flash Tutorials
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript: Analog Clock TcM Javascript 20 05-28-2008 09:01 AM
Creating an analog clock with ActionScript AfTriX Tutorials 2 01-07-2007 02:19 AM
Cool LCD Clock AfTriX Javascript 2 01-04-2007 01:00 AM
Creating a backup script NeedHelp General Programming 3 09-07-2006 05:14 AM


All times are GMT -5. The time now is 12:33 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
LogicKills ........ 20.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads