Documentation component by D.Glodt (c)2003 | Appendix A: QAnim |
|
Field | Type | R/W | Default | |
|
|
|
|
|
Width | SHORT | R/W | ||
Height | SHORT | R/W | ||
Left | SHORT | R/W | ||
Top | SHORT | R/W | ||
Visible | INTEGER | R/W | False | |
ImageList | QIMAGELIST | R/W | ||
images for animation | ||||
Index | SHORT | R/W | 0 | |
Index image and show image | ||||
BackColor | LONG | R/W | ||
Backcolor used for images if use image mask | ||||
Masked | BOOLEAN | R/W | False | |
Use image mask | ||||
Move | BOOLEAN | R/W | False | |
Start/Stop animation |
Method | Type | Description | Params | |
|
|
|
|
|
Event | Type | Occurs when... | Params | |
|
|
|
|
|
QAnim Example
$TypeCheck on
$include "rapidq.inc"
$include "Object/QAnim.inc"
$resource img1 as "earthspn_frame_000.bmp"
$resource img2 as "earthspn_frame_001.bmp"
$resource img3 as "earthspn_frame_002.bmp"
$resource img4 as "earthspn_frame_003.bmp"
$resource img5 as "earthspn_frame_004.bmp"
$resource img6 as "earthspn_frame_005.bmp"
$resource img7 as "earthspn_frame_006.bmp"
$resource img8 as "earthspn_frame_007.bmp"
$resource img9 as "earthspn_frame_008.bmp"
$resource img10 as "earthspn_frame_009.bmp"
declare sub anim
declare sub opaque
declare sub transparent
declare sub close
CREATE Form AS QFORM
Caption = "Form1"
Width = 220
Height = 170
Center
OnClose=close
CREATE bt1 as QBUTTON
caption="Opaque"
left=120
top=10
OnClick=Opaque
END CREATE
CREATE bt2 as QBUTTON
caption="Transparent"
left=120
top=40
OnClick=Transparent
END CREATE
CREATE bt3 as QBUTTON
caption="Start/Stop"
left=120
top=70
OnClick=Anim
END CREATE
CREATE Image1 AS QAnim
Left=10
Top=10
width=96
height=96
BackColor=&hff0000
Masked=true
Imagelist.AddBMPhandle img1,
&h0
Imagelist.AddBMPhandle img2,
&h0
Imagelist.AddBMPhandle img3,
&h0
Imagelist.AddBMPhandle img4,
&h0
Imagelist.AddBMPhandle img5,
&h0
Imagelist.AddBMPhandle img6,
&h0
Imagelist.AddBMPhandle img7,
&h0
Imagelist.AddBMPhandle img8,
&h0
Imagelist.AddBMPhandle img9,
&h0
Imagelist.AddBMPhandle img10,
&h0
speed=100
index=0
END CREATE
END CREATE
Form.ShowModal
sub anim
if Image1.move then
Image1.Move=false
else
Image1.Move=true
end if
end sub
sub opaque
Image1.BackColor=&haa0000
end sub
sub transparent
Image1.BackColor=form.color
end sub
sub close
Image1.Move=false
application.terminate
end sub