[RESOLVED] analog clock with xp graphics
i read all the codes in the forum for analog clocks , the codes are amazing but the graphics are way old.
i'm looking for a application for an analog clock with new conceptual graphics.
P.S: analog clock= like the wall clock.
thank you for your time.
Regards
Re: analog clock with xp graphics
So use the code you found (which will give you the angles etc), and change the graphical part to suit whatever it is you want.
If you have trouble doing it, show us the code and explain what the problem is.
Re: analog clock with xp graphics
hi again
this is the code i have,
Code:
Public Sub ShowAnalogTime(ByVal MyTime As Date, Pic As PictureBox)
Dim H As Single, M As Single, S As Single
Const HPI As Double = 1.5707963267949 ' (4 * Atn(1)) / 2
Const PI2 As Double = 6.28318530717959 ' (4 * Atn(1)) * 2
H = (Hour(MyTime) Mod 12) / 12#
M = Minute(MyTime) / 60#
S = Second(MyTime) / 60#
Pic.Scale (-1.1, -1.1)-(1.1, 1.1)
Pic.DrawWidth = 2
Pic.Cls
Pic.Circle (0, 0), 1, RGB(128, 128, 128)
Pic.Line (0, 0)-(0.5 * Cos(PI2 * H - HPI), 0.5 * Sin(PI2 * H - HPI)), RGB(0, 0, 128)
Pic.Line (0, 0)-(0.8 * Cos(PI2 * M - HPI), 0.8 * Sin(PI2 * M - HPI)), RGB(128, 128, 255)
Pic.Line (0, 0)-(Cos(PI2 * S - HPI), Sin(PI2 * S - HPI)), RGB(255, 255, 255)
End Sub
Private Sub Timer1_Timer()
ShowAnalogTime Time, Picture1
End Sub
it runs extremly well.
i don't have a clue about graphics, this is why i'm asking you guys.
thank you for your help.
Re: analog clock with xp graphics
OK, well that uses a single line for each of the hands... what is it that you want to use instead?
Re: analog clock with xp graphics
i'm just asking if you have a component or a microsoft application or something like that, like let say the calendar in VB it is already a component,.
i'm asking if i can download something like this as a component or application that i can use in my forms.
thank you for your time.
Re: analog clock with xp graphics
There might be something, search the web for ActiveX control along with whatever keywords you think are apt.
However, creating it yourself should be easy enough, as you only need to change the graphics used - quite how you do that depends on what graphics you want.
Re: analog clock with xp graphics
For Clock with GDI+ graphics try this:
ucClock - Photorealistic Clock Control Update:March 28
http://www.planet-source-code.com/vb...68149&lngWId=1
Another one - does not require GDI+
Anti-Alias 2D Engine (Line,Arc,Circle,Ellipse,Polygon). Pure Vb (NO dependencies)
With Clock Demo - anti-aliased polygon clockhands
http://www.planet-source-code.com/vb...38582&lngWId=1
Re: analog clock with xp graphics
DrUniCode i thank you for your great help.
:thumb:
Re: analog clock with xp graphics
guys im new to this forum, how can i put it as RESOLVED ?
Re: analog clock with xp graphics
click Thread Tools and click Resolved