How to Place Animated Graphics on a Minimized Form in VBID: Q79601
|
You can place animated graphics onto a minimized form in Visual Basic. Normally, when a form is minimized, the form is replaced with an icon that had been previously set using the Icon property of that form. This icon is an actual bitmap that cannot be manipulated. Using the method below, the icon can be replaced with a set of graphics methods that will draw to the minimized form.
To place animated graphics onto a minimized form, you must use a timer
event. This will allow the program to continue its animation when the
form is minimized. A minimized form is just like a non-minimized form,
except its size is decreased and certain rules apply. The following
guidelines should be followed when creating animated graphics on a
form:
Static prevx!, prevy!
If windowstate = 1 Then 'Checks to see if form is
'minimized.
form1.Scale (0, 0)-(100, 100) 'Sets the max height and
'width of the form.
fillcolor = QBColor(0)
Circle (prevx!, prevy!), scalewidth / 10, QBColor(0)
fillstyle = 0
fillcolor = QBColor(1)
prevx! = Int(Rnd(1) * scalewidth) + 1
prevy! = Int(Rnd(1) * scaleheight) + 1
Circle (prevx!, prevy!), scalewidth / 10, QBColor(1)
End If
Additional query words: 2.00 3.00
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: June 16, 1999