Click here to Skip to main content
Licence 
First Posted 3 Feb 2002
Views 152,678
Bookmarked 54 times

Digital Clock & Timer ActiveX Control

By | 3 Feb 2002 | Article
This is an ActiveX control that can be used as a digital clock, or as a timer.

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

About the Author

Tzoockee

Web Developer

Belgium Belgium

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalwindow form refreshing Pinmemberkirandilip22:00 21 Dec '08  
QuestionRUNTIME ERROR Pinmemberbondhon7:41 15 Oct '08  
GeneralPublish activeX error! Pinmemberwahaha_ts21:52 15 Feb '06  
Generalcompile errors Pinmemberdaveand515:37 7 Feb '06  
Generaldemo source file Pinmemberdavidge20:08 7 May '04  
GeneralRefresh Problem again PinmemberHing22:56 18 Apr '04  
GeneralRe: Refresh Problem again Pinmemberlchjxsh23:31 10 May '04  
GeneralRefreshing Window PinmemberCapoeira_Olly13:47 12 Jan '04  
GeneralRe: Refreshing Window PinmemberTzoockee20:45 12 Jan '04  
GeneralRe: Refreshing Window PinmemberCapoeira_Olly8:21 13 Jan '04  
GeneralRe: Refreshing Window PinmemberCapoeira_Olly8:35 13 Jan '04  
GeneralRe: Refreshing Window PinmemberTzoockee21:09 13 Jan '04  
GeneralRe: Refreshing Window PinmemberTzoockee21:09 13 Jan '04  
QuestionCould I regist this controls as a common controls? PinmemberICE_WIZARD6:22 25 Jul '03  
AnswerRe: Could I regist this controls as a common controls? PinmemberTzoockee12:40 1 Aug '03  
GeneralRe: Could I regist this controls as a common controls? PinmemberICE_WIZARD18:32 1 Aug '03  
GeneralPublishing an activex PinmemberBalteo8:39 6 Sep '02  
GeneralRe: Publishing an activex PinsussAnonymous0:55 19 Apr '03  
GeneralRe: Publishing an activex PinmemberTzoockee23:26 19 Apr '03  
GeneralTrouble Starting Timer PinmemberAnonymous9:13 15 Apr '02  
GeneralRe: Trouble Starting Timer Pinmemberdevwat15:10 19 Jun '04  
GeneralRe: Trouble Starting Timer PinmemberTzoockee20:08 20 Jun '04  
GeneralFlicker PinmemberAnonymous5:55 6 Feb '02  
GeneralRe: Flicker PinmemberAnonymous4:27 18 Feb '02  

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.

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