Analog Clock Component

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Analog Clock Component

Postby Kambiz » 23/03/09 13:13

I was looking for an Analog Clock component on the net couldn't find something nice. Therefore, I wrote one.

Clocks.png


In other hand, I am not a Graphic Designer. Because of that I used Windows' Sidebar clock images to write the component. I think because of copyright issues we cannot use this component. But some freeware images will solve the problem.

The attachment is a demo of the component.
You do not have the required permissions to view the files attached to this post.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: Analog Clock Component

Postby w2m » 23/03/09 13:55

The old TurboPower Orpheus Component has a OVCClock component. A Delphi 2009 version is available here: http://www.songbeamer.com/delphi/

Since the company is no longer is in business you might be able to use its clockface bitmaps.
w2m
w2m
Senior Member
Senior Member
 
Posts: 76
Joined: 08/03/03 19:11
Location: New York, USA

Re: Analog Clock Component

Postby Kambiz » 24/03/09 13:10

I took a look at OVCClock component, but didn't find something useful.

The analog clock needs at least 5 semi-transparent PNG images:

  1. Clock face
  2. Hour hand
  3. Minute hand
  4. Second hand
  5. A pin when second hand is not showing
  6. Optional overlay glass
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: Analog Clock Component

Postby kokkoras » 25/03/09 00:00

In your demo, when you hide the seconds hand, the minutes hand shifts a bit. I guess you round the time but you should better just hide the seconds hand.
Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: 12/03/05 23:19
Location: Thessaloniki, Greece

Re: Analog Clock Component

Postby Kambiz » 25/03/09 13:21

I thought when somebody hides the second hand, he/she whats the control consumes less CPU time. Because of that when ShowSeconds is False, the control updates every minute instead of every second.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: Analog Clock Component

Postby lucho6007 » 15/05/09 23:20

Can you publish the source code of the component?
I need an analog clock like that!
Thanks!

Sorry for my dummy English, I'm an Argentinian programmer and my native language is Spanish!.
lucho6007
Member
Member
 
Posts: 1
Joined: 30/10/08 16:48

Re: Analog Clock Component

Postby Kambiz » 16/05/09 10:01

I attached the source code of AnalogClock component. You need GDI+ Library to install and use it.

Be aware of copyright issues regarding the clock faces. If you design your own clock faces, everything would be fine. Use a resource editor to get PNG image of the clock faces and hands.

Please do not distribute the code.
You do not have the required permissions to view the files attached to this post.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: Analog Clock Component

Postby donalddukw » 26/03/11 10:15

Hi,
Great post - thanks. I'd like to create this in Delphi XE.

Where did you get the images in the first post?

I'd like to create an application for my own use so copyright isn't an issue.

Cheers
donalddukw
Member
Member
 
Posts: 1
Joined: 26/03/11 10:11

Re: Analog Clock Component

Postby Kambiz » 26/03/11 12:09

The images are from Windows sidebar's clock gadget.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: Analog Clock Component

Postby mabudaff » 09/01/12 09:26

Thank you for the component, TAnalogClock
I have tried with Delphi 7....
it installed successfully,...
but when I place it on the form ....It's makes exception
any help ... please :)
mabudaff
Member
Member
 
Posts: 1
Joined: 09/01/12 09:22

Re: Analog Clock Component

Postby Kambiz » 03/02/12 13:18

This component needs GDI+. Have you installed the GDI+ Library properly?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2181
Joined: 07/03/03 19:10
Location: Tehran, Iran


Return to DELPHI AREA Products

Who is online

Users browsing this forum: Google [Bot] and 1 guest