Home > Software engineering >  VB level flow control
VB level flow control

Time:09-20

Everybody is good! Which friend VB flow liquid level control, is in the pipeline flow effect! Share QQ 94505309 paid

CodePudding user response:

No single such controls, can use the Flash animation display, VB has a Flash controls loading Flash animation,

CodePudding user response:

Can draw, write a casually you can try if you want to effect, custom line drawing function in the first four parameters are the two endpoint coordinates, the two are internal piecewise line width and line number
Create a new project, make a button in the form, a picture box a timer, paste the following code and see,
, of course, this effect is drawn or think about animation is a little points out, and the sum of animation X coordinate, vertical line only flicker, algorithm and can adjust the drives to take son to go out, but the wife posted first,

 
Private Sub Command1_Click ()
Timer1. Interval=100
Timer1. Enabled=Not (Timer1. Enabled)
End Sub

Private Sub MyLines ()
'linear example
MyWaveLine Picture1, 100, 30, 200, 30, 10, 10
'different segmented example
MyWaveLine Picture1, 100, 50, 200, 50, 10, 4
'direction example
MyWaveLine Picture1, 200, 70, 100, 70, 10, 4
'bold example
MyWaveLine Picture1, 100, 100, 200, 100, 20, 5
'line example
MyWaveLine Picture1, 100, 120, 180, 200, 20, 10
MyWaveLine Picture1, 180, 200, 260, 120, 20, 10

End Sub

Private Sub myWaveLine (obj As Object, the x1 As Long, y1 As Long, x2 As Long, y2 As Long, intWidth As an Integer, intsplit As Integer)
The Static intWave As Long
Dim As Long I
Dim j As Integer
Dim xS As Long, yS As Long

Obj. DrawWidth=intWidth
For I=0 To intsplit - 1
XS=x1 + x2 - x1)/intsplit * I
YS=y1 + (y2 - y1)/intsplit * I

For j=0 To 9
Obj. Line (xS + (x2 - x1)/10/intsplit * j, yS + (y2 - y1)/10/intsplit * j) - (+ (x2 - x1)/xS 10/intsplit * (j + 1), yS + (y2 - y1)/10/intsplit * (j + 1)), RGB (0, 0, 255 * Cos (((xS + (x2 - x1)/100 * j + intWave) Mod intsplit)/intsplit * 3.14/2))
Next
Next
IntWave=intWave + 1

End Sub


Private Sub Form_Load ()
Me. The ScaleMode=3
Me. The Picture1. The ScaleMode=3
End Sub

Private Sub Timer1_Timer ()
Timer1. Enabled=False
Call MyLines
Timer1. Enabled=True
End Sub


  • Related