Click here to Skip to main content
11,496,146 members (586 online)
Click here to Skip to main content

Digital Clock & Timer ActiveX Control

, 3 Feb 2002 166.6K 8.7K 57
This is an ActiveX control that can be used as a digital clock, or as a timer.
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.

Sample Image - DTimer.gif

Introduction

This is an ActiveX control developed in Visual C++ 6.0. It can be used as a digital clock, or as a timer. To use, simply add to your project, put it on a form, and associate it with a class member using the Class Wizard. You can customize it using the following methods:

  • void CDTimer::SetColors(OLE_COLOR back, OLE_COLOR line, OLE_COLOR text)

    To set the color appearance.

  • void CDTimer::SetMode(short mode)

    To set it as a clock or a timer.

  • void CDTimer::SetTime(short hou, short min, short sec)

    To display a specific time.

Examples:

m_timer.SetColors(RGB(0,0,0),RGB(0,0,0),RGB(255,0,0));
//display red numbers on black background

m_timer.SetMode(0);
// 0 for digital clock, 1 for custom timer.

m_timer.SetTimer(20,8,45);
//set the time to 20:08:45

When setting it as a custom timer, you must start a timer in which you update the time by calling the SetTime member function.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Tzoockee
Web Developer
Belgium Belgium
No Biography provided

Comments and Discussions

 
GeneralMy vote of 5 Pin
hping169-Jan-13 4:29
memberhping169-Jan-13 4:29 
Generalwindow form refreshing Pin
kirandilip21-Dec-08 23:00
memberkirandilip21-Dec-08 23:00 
hai gud afternoon everyone,
i created a window form using c#.net & ado.net with sqlserver database.
in my form i use a combobox that contains customerid,connected to the database.if i want to add new customerid to the combobox at dynamically,for that purpose i can use a button,if we can click a button click that opens a new form with new customer details,enter the customer details and submit the database,that customerid column is also in main form database.my problem is if i enter new customer id at run time that id could not display in hte combobox at run time .i can use refresh method to referesh the form, the form should be refresh but the enter id did not display in the combobox.how can i overcome my problem,plz populate a solution to my problem.
thanks in advance.
QuestionRUNTIME ERROR Pin
bondhon15-Oct-08 8:41
memberbondhon15-Oct-08 8:41 
GeneralPublish activeX error! Pin
wahaha_ts15-Feb-06 22:52
memberwahaha_ts15-Feb-06 22:52 
Generalcompile errors Pin
daveand57-Feb-06 16:37
memberdaveand57-Feb-06 16:37 
Generaldemo source file Pin
davidge7-May-04 21:08
memberdavidge7-May-04 21:08 
GeneralRefresh Problem again Pin
Hing18-Apr-04 23:56
memberHing18-Apr-04 23:56 
GeneralRe: Refresh Problem again Pin
lchjxsh11-May-04 0:31
memberlchjxsh11-May-04 0:31 
GeneralRefreshing Window Pin
Capoeira_Olly12-Jan-04 14:47
memberCapoeira_Olly12-Jan-04 14:47 
GeneralRe: Refreshing Window Pin
Tzoockee12-Jan-04 21:45
memberTzoockee12-Jan-04 21:45 
GeneralRe: Refreshing Window Pin
Capoeira_Olly13-Jan-04 9:21
memberCapoeira_Olly13-Jan-04 9:21 
GeneralRe: Refreshing Window Pin
Capoeira_Olly13-Jan-04 9:35
memberCapoeira_Olly13-Jan-04 9:35 
GeneralRe: Refreshing Window Pin
Tzoockee13-Jan-04 22:09
memberTzoockee13-Jan-04 22:09 
GeneralRe: Refreshing Window Pin
Tzoockee13-Jan-04 22:09
memberTzoockee13-Jan-04 22:09 
QuestionCould I regist this controls as a common controls? Pin
ICE_WIZARD25-Jul-03 7:22
memberICE_WIZARD25-Jul-03 7:22 
AnswerRe: Could I regist this controls as a common controls? Pin
Tzoockee1-Aug-03 13:40
memberTzoockee1-Aug-03 13:40 
GeneralRe: Could I regist this controls as a common controls? Pin
ICE_WIZARD1-Aug-03 19:32
memberICE_WIZARD1-Aug-03 19:32 
GeneralPublishing an activex Pin
Balteo6-Sep-02 9:39
memberBalteo6-Sep-02 9:39 
GeneralRe: Publishing an activex Pin
Anonymous19-Apr-03 1:55
sussAnonymous19-Apr-03 1:55 
GeneralRe: Publishing an activex Pin
Tzoockee20-Apr-03 0:26
memberTzoockee20-Apr-03 0:26 
GeneralTrouble Starting Timer Pin
Anonymous15-Apr-02 10:13
memberAnonymous15-Apr-02 10:13 
GeneralRe: Trouble Starting Timer Pin
devwat19-Jun-04 16:10
memberdevwat19-Jun-04 16:10 
GeneralRe: Trouble Starting Timer Pin
Tzoockee20-Jun-04 21:08
memberTzoockee20-Jun-04 21:08 
GeneralFlicker Pin
Anonymous6-Feb-02 6:55
memberAnonymous6-Feb-02 6:55 
GeneralRe: Flicker Pin
Anonymous18-Feb-02 5:27
memberAnonymous18-Feb-02 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 4 Feb 2002
Article Copyright 2002 by Tzoockee
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid