Visual Basic provides a Timer control, which is essentially a set interval of time triggered procedures so that we can hide in the system to a time interval trigger procedures. The flexibility to use it can get very subtle effects.
Below, we give an example.
We can design the interface design of such an effect: a line of text in the form of gradually rolling from left to right, from the right "roll out" the form of text, then left to emerge. So the cycle continues. Information similar to the rolling television. This will allow you to design the software looked very lively and can easily cause the user's interest. In fact, the use of Visual Basic's Timer control can easily achieve it.
First, we set in the form of two Label controls Label1, Label2. Left control, in addition to the two properties, other properties set to the same. This is mainly to achieve the effect of rolling cycle. Their Caption property to display the text to scroll. Also re-adjust its font, size and color. In the Form-Load process set Label2. Left =- 6240 (Form width), Label1. Left = 0. This will ensure that La 顎?bel1 part of the "rolling" out of form, then part of the entry form Label2. Rolling circle formed in the form set? / FONT> Timer control. Timer control's Interval property determines the speed of rolling, in milliseconds.
For example, we set to 300, then roll once every 0.3 seconds.
Then, in the Timer1-Timer () process by adding the following procedures:
Private Sub Timer1-Timer ()
Label1. Left = Label1. Left +50
Label2. Left = Label2. Left +50
If Label1. Left> = 6240 Then
Label1. Left =- 6240
If Label2. Left> = 6240 Then
Label2. Left = 6240
Rolling effect on the form, the interested reader can try. As long as the flexible use Timer control, we can design a more interesting effect. Timer control with control buttons, such as control of the Visible property to form a flashing button. Timer control with the control to display different images to form a simple animation.
FLV to iPod
comparison Graphic Editors
Bird, founder of Wu Yimin information: only 40 person-years team 1 million yuan Profit
Norton Ghost Clone Parameter Four Examples Demonstrate
JSP Servlet automatically jump to the wrong instance of the page
Joan Chen: "Nuclear high-based" special to be drying faster
zlib dll not found error repairing tool
H.264 To AVI
Advice: be careful to FORMAT the disk partition
Interpretation of the computer can not shut down Five major issues raised
Watch cool mechanical picture Production process
Ashes of modern CAE
Picked Games Kids
MTS TO MP4