Advertisement
2002ASP Custom Controls/ Forms/ Menus #6522

AnimatedGradientLabel

Making Animated Gradien Label. Changing the background of a label.

AI

ИИ-обзор: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Исходный код
original-source
'Add 1 labelbox and timer to your form<br>
'<br>
'Name the labelbox as Label1<br>
'<br>
'Name the timer as Timer1<br>
'
'Insert the following code to your form:<br>
 Private Sub Timer1_Timer()<br>
 Static A<br>
  A = A + 10: If A > 510 then A = 0<br>
'To change the effect, put other numbers<br>
'insted of the 0 below.<br>
'<br>
'You can also replace places betwwen <br>
'the 'Abs '(A-256))' and one of the zeros<br>
'below.<br>
'To decrease the pace of the animation, <br>
'increase the timer interval property.<br>
<br>
Label1.BackColor = RGB(Abs(A - 256),0,0)<br>
<br>
End Sub
Оригинальные комментарии (3)
Восстановлено из Wayback Machine