Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Analogni časovnik...

[es] :: Visual Basic 6 :: Analogni časovnik...

[ Pregleda: 6972 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

slaven_pg
Podgorica

Član broj: 47869
Poruke: 43
*.crnagora.net.



Profil

icon Analogni časovnik...06.04.2006. u 18:58 - pre 218 meseci
Pozdrav!

Imam zadatak da napravim digitalni i analogni časovnik...

Digitalni sam napravio bez po' muke, ali me muči ovaj analogni.

Ima li neko ideju tj. postoji li neka prečica, da ne bih definisao pomjeranja tri kazaljke po šezdeset puta, jer mi je to ogroman posao... definisanje ukupno sto osamdeset položaja...

Početnik sam sa radom u VB, pa bi mi bilo kakva pomoć dobro došla.
 
Odgovor na temu

mladenovicz
Zeljko Mladenovic
Xoran Technologies, Inc., Ann Arbor, MI,
USA / Software Engineer
Ann Arbor, MI, USA

Član broj: 6598
Poruke: 2065
*.ded.ameritech.net.

Jabber: mladenovicz@elitesecurity.org
ICQ: 95144142
Sajt: yubc.net/~mz


Profil

icon Re: Analogni časovnik...06.04.2006. u 19:33 - pre 218 meseci
Za ovo ti treba geometrija.

Analog Clock

More ...
 
Odgovor na temu

DMX

Član broj: 44350
Poruke: 122
*.SMIN.panline.net.



Profil

icon Re: Analogni časovnik...07.04.2006. u 19:54 - pre 218 meseci
Evo jednog analognog sata sa datumom koji se rotira oko njega.
Prilicno interesantno izgleda.
Da se ja pitam, ja bih ovuda proterao autobus.
Prikačeni fajlovi
 
Odgovor na temu

Aleksandar Ružičić
Software Architect, Appricot d.o.o.
Beograd

Član broj: 26939
Poruke: 2881

Jabber: krckoorascic@gmail.com
Sajt: krcko.net


+44 Profil

icon Re: Analogni časovnik...08.04.2006. u 01:17 - pre 218 meseci
moz to da uradis i bez geometrije, recimo ako imas neku 3d kazaljku malo teze ces da rotiras slicicu, zato ti je najbolje da napravis animaciju, iscrtas kazaljku u svim polozajima (59 frejmova ako neces "prelazne" pozicije) i samo prikazes odredjeni frejm...
 
Odgovor na temu

zeljo.vb.net
Zeljko Tmm

Član broj: 13491
Poruke: 18
*.wireless.rskoming.net.



Profil

icon Re: Analogni časovnik...25.04.2006. u 15:30 - pre 218 meseci
Posalji mi E-Mail da ti posaljem primjer :


'Please send your openion to me
'My address is [email protected]
'I believe that u will like this software
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GCL_HCURSOR = (-12)
Private hOldCursor As Long
Dim X As Integer
Dim Y As Integer
Dim z As Integer
Dim i As Integer
Dim PI, Radius, Radians As Double
Dim hrs, Min, Sec As Integer
Dim Pq As Double
Dim b As Integer
Dim str As String
Sub cur()
Dim hNewCursor As Long
hNewCursor = LoadCursorFromFile(App.Path & "\n.ani")
hOldCursor = SetClassLong(hwnd, GCL_HCURSOR, hNewCursor)
End Sub

Private Sub b_Click(Index As Integer)
Image1.Picture = Picture3.Picture
End Sub

Private Sub bl_Click(Index As Integer)
Image1.Picture = Picture3.Picture
End Sub

Private Sub Form_Load()
PI = 3.14159265358979
seconds.X1 = 2660
seconds.Y1 = 3165
minutes.X1 = seconds.X1
hours.X1 = seconds.X1
minutes.Y1 = seconds.Y1
hours.Y1 = seconds.Y1
Radius = 1680
str = "Perfect clock by [email protected]"
b = Len(str)
i = 1
Call cur
End Sub

Private Sub gr_Click(Index As Integer)
Image1.Picture = Picture4.Picture
End Sub

Private Sub r_Click(Index As Integer)
Image1.Picture = Picture1.Picture
End Sub

Private Sub Timer1_Timer()
Timer1.Interval = 1000
hrs = Hour(Time$) * 5 - 12
Sec = Second(Time$)
Min = Minute(Time) - 14
sndPlaySound (App.Path & "\t.wav"), 1
Radians = Sec / 180 * PI
seconds.X2 = seconds.X1 + Cos(Radians * 6) * (Radius - 600)
seconds.Y2 = seconds.Y1 + Sin(Radians * 6) * (Radius - 600)
Radians = Min / 180 * PI
minutes.X2 = seconds.X1 + Cos(Radians * 6) * (Radius - 900)
minutes.Y2 = seconds.Y1 + Sin(Radians * 6) * (Radius - 900)
Radians = hrs / 180 * PI
hours.X2 = seconds.X1 + Cos(Radians * 6) * (Radius - 1200)
hours.Y2 = seconds.Y1 + Sin(Radians * 6) * (Radius - 1200)
End Sub

Private Sub Timer2_Timer()
Timer2.Interval = 100
Me.Caption = Left(str, i)
i = i + 1
If i = b + 1 Then
Timer2.Interval = 3000
i = 0
End If
End Sub

Private Sub v_Click(Index As Integer)
Image1.Picture = Picture2.Picture
End Sub

Private Sub ye_Click(Index As Integer)
Image1.Picture = Picture5.Picture
End Sub
 
Odgovor na temu

[es] :: Visual Basic 6 :: Analogni časovnik...

[ Pregleda: 6972 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.