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.
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...
'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