http://www.networkmaestro.com/animatedata.exe
And if you'd like to easily add this control to your projects, this is where to get the library and help files:
http://www.networkmaestro.com/animatedata.zip
Code: Select all
;==========================================
; Userlibrary: AnimateData(w,h,delay)
; Author: netmaestro
; Date: June 30, 2006
; Target Compiler: PureBasic 4.0
; Target OS: Windows all
;==========================================
;
ProcedureDLL AnimateData(w.l,h.l,delay.l)
Static tt.l=0,cc.l=0,c1.l=0,c2.l=0,aniimage.l=0,init.l=0
If Not init
init=#True
Static Dim t.s(17)
t(0)= "110100000000000000"
t(1)= "011010000000000000"
t(2)= "001101000000000000"
t(3)= "000110100000000000"
t(4)= "000011010000000000"
t(5)= "000001101000000000"
t(6)= "000000110100000000"
t(7)= "000000011010000000"
t(8)= "000000001101000000"
t(9)= "000000000110100000"
t(10)= "000000000011010000"
t(11)= "000000000001101000"
t(12)= "000000000000110100"
t(13)= "000000000000011010"
t(14)= "000000000000001101"
t(15)= "100000000000000110"
t(16)= "010000000000000011"
t(17)= "101000000000000001"
*unpacked = AllocateMemory(3128)
UnpackMemory(?PicPak, *unpacked)
computer = CatchImage(#PB_Any, *unpacked, 3128)
FreeMemory(*unpacked)
StartDrawing(ImageOutput(computer))
For i=0 To 31
For j=0 To 31
If Point(i,j)=RGB(255,0,255)
Plot(i,j,GetSysColor_(#COLOR_BTNFACE))
EndIf
Next
Next
StopDrawing()
c1=CreateImage(#PB_Any,36,32)
c2=CreateImage(#PB_Any,36,32)
StartDrawing(ImageOutput(c1))
Box(0,0,36,32,GetSysColor_(#COLOR_BTNFACE))
DrawImage(ImageID(computer),0,0)
StopDrawing()
StartDrawing(ImageOutput(c2))
Box(0,0,36,32,GetSysColor_(#COLOR_BTNFACE))
DrawImage(ImageID(computer),4,0)
StopDrawing()
aniimage=CreateImage(#PB_Any, 224,32)
EndIf
If ElapsedMilliseconds()-tt > delay
StartDrawing(ImageOutput(aniimage))
DrawImage(ImageID(c1),0,0)
DrawImage(ImageID(c1),188,0)
StopDrawing()
tt=ElapsedMilliseconds()
cc+1
StartDrawing(ImageOutput(aniimage))
Box(0,0,224,32,GetSysColor_(#COLOR_BTNFACE))
DrawText(40,10,t(cc),0,GetSysColor_(#COLOR_BTNFACE))
StopDrawing()
If cc >= 17
cc=0
EndIf
StartDrawing(ImageOutput(aniimage))
If cc=13
DrawImage(ImageID(c1),188,0)
Else
DrawImage(ImageID(c2),188,0)
EndIf
If cc=14
DrawImage(ImageID(c2),188,0)
Else
DrawImage(ImageID(c1),188,0)
EndIf
If cc=1
DrawImage(ImageID(c1),0,0)
Else
DrawImage(ImageID(c2),0,0)
EndIf
If cc=2
DrawImage(ImageID(c2),0,0)
Else
DrawImage(ImageID(c1),0,0)
EndIf
StopDrawing()
ResizeImage(aniimage,w,h)
ProcedureReturn ImageID(aniimage)
Else
ProcedureReturn 0
EndIf
DataSection
PicPak:
Data.b $4A,$43,$38,$0C,$00,$00,$DB,$6D,$A9,$6B,$B3,$A9,$D0,$20,$69,$14,$61,$88,$12,$CA
Data.b $08,$B0,$48,$40,$27,$90,$04,$8E,$01,$C6,$5B,$28,$31,$10,$9F,$02,$0C,$02,$35,$60
Data.b $08,$F0,$02,$0C,$38,$F5,$60,$06,$01,$E6,$00,$03,$CC,$5D,$EF,$02,$36,$AF,$66,$1E
Data.b $60,$15,$00,$03,$6E,$35,$C0,$FC,$81,$EE,$A3,$C7,$8C,$2A,$11,$CB,$EF,$00,$37,$BE
Data.b $31,$23,$16,$96,$80,$53,$4B,$30,$30,$AC,$CA,$2A,$C0,$E8,$1A,$33,$2A,$43,$D7,$EC
Data.b $4E,$30,$8C,$E2,$36,$4B,$EF,$31,$B3,$07,$12,$BE,$00,$CB,$30,$50,$B5,$59,$09,$66
Data.b $C7,$56,$51,$03,$9C,$7F,$4B,$42,$6D,$6A,$C0,$8C,$7B,$26,$F8,$0F,$30,$AF,$01,$B7
Data.b $37,$E3,$CC,$51,$55,$80,$62,$24,$66,$6F,$32,$FE,$02,$2C,$E7,$6C,$CC,$B8,$6B,$66
Data.b $F3,$B6,$F7,$BC,$0A,$8E,$2E,$F0,$BC,$62,$82,$F2,$0F,$30,$FA,$78,$3D,$FA,$33,$BF
Data.b $4C,$28,$B3,$1B,$CC,$18,$02,$33,$6E,$14,$03,$E0,$F8,$FF,$78,$38,$2A,$EB,$60,$8E
Data.b $2E,$C0,$FA,$86,$8A,$7A,$EC,$13,$F7,$E2,$3B,$AB,$F5,$A9,$81,$8E,$7F,$01,$3B,$91
Data.b $CB,$FB,$EC,$AE,$06,$8C,$00,$00,$88,$44
PicPakend:
EndDataSection
EndProcedure