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

Analogni časovnik...

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

[ Pregleda: 1514 | Odgovora: 4 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

slaven_pg
Podgorica

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



Profil

icon Analogni časovnik...06.04.2006. u 18:58

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.
06.04.2006. u 18:58 

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

Moderator
Član broj: 6598
Poruke: 2064
*.ded.ameritech.net.

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


Profil

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

Analog Clock

More ...
06.04.2006. u 19:33 

DMX

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



Profil

icon Re: Analogni časovnik...07.04.2006. u 19:54
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
07.04.2006. u 19:54 

Aleksandar Ružičić
Developer, Haragei Creative Solutions
Beograd - Čačak

Moderator
Član broj: 26939
Poruke: 1781
*.yu1.net.

Jabber: krcko@haragei.com
Sajt: krcko.haragei.org


Profil

icon Re: Analogni časovnik...08.04.2006. u 01:17
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...
Čovekova dostignuća prevazilaze njegovu maštu.
08.04.2006. u 01:17 

zeljo.vb.net
Zeljko Tmm

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



Profil

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


'Please send your openion to me
'My address is sarathavs@hotmail.com
'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 sarathavs@hotmail.com"
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
25.04.2006. u 15:30 

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

[ Pregleda: 1514 | Odgovora: 4 ]

Postavi temu Odgovori

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