Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Animated cursor generator

Status
Not open for further replies.
I enhanced (in the same FAQ) the function.
Now you can specify the order of images (frames) and the delay (speed) of each frame.
In the next example five icons are used to create an animation with 8 frames. The last frame stay longer than the other 7.

Code:
CLEAR RESOURCES
CLEAR ALL
LOCAL laIcons[5], laSeq[8,2]
SET SAFETY OFF 

* List of mages
laIcons[1] = HOME(4)+"Icons\Misc\FACE01.ICO"
laIcons[2] = HOME(4)+"Icons\Misc\FACE02.ICO"
laIcons[3] = HOME(4)+"Icons\Misc\FACE03.ICO"
laIcons[4] = HOME(4)+"Icons\Misc\FACE04.ICO"
laIcons[5] = HOME(4)+"Icons\Misc\FACE05.ICO"

* order of frames
laSeq[1,1] = 0
laSeq[2,1] = 1
laSeq[3,1] = 2
laSeq[4,1] = 4
laSeq[5,1] = 2
laSeq[6,1] = 1
laSeq[7,1] = 0
laSeq[8,1] = 3

* time (speed) of each frame
laSeq[1,2] = 10
laSeq[2,2] = 10
laSeq[3,2] = 10
laSeq[4,2] = 10
laSeq[5,2] = 10
laSeq[6,2] = 10
laSeq[7,2] = 10
laSeq[8,2] = 60

lcAni = ico2ani("ff.ani",@laIcons,15,@laSeq)

PUBLIC ofrm
ofrm = CREATEOBJECT("form")
ofrm.MousePointer = 99
ofrm.MouseIcon = m.lcAni

ofrm.show()

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top