How to paint stereo graphics in VB

zhaozj2021-02-16  58

Form layout:

Control Attribute Value Timer1 EnabledFlaseInterval1Command1caption Draws Command2caption Save

CommonDialog1, each property does not have to change.

Code:

DIM I AS INTEGERDIM A AS INTEGERDIM B AS SINGLE

Private sub fascist1_click () Timer1.enabled = TRUE

End Sub

Private Sub Command2_Click () Me.AutoRedraw = FalseCommonDialog1.Filter = "bitmap (* bmp.) | * .Bmp" CommonDialog1.ShowSaveIf CommonDialog1.FileName <> "" ThenSavePicture Me.Image, CommonDialog1.FileNameEnd IfEnd Sub

Private sub flow_load () i = 0A = 0b = 0nd Sub

Private sub timer1_timer () i = i 1A = a 5Line (4000, 1800 a) - (7000, 1800 A), RGB (0, ABS (255 - A / 10), 0) Line (4000 A 1800 - A) - (7000 A, 1800 - A), RGB (0, ABS (255 - A / 10), 0) LINE (7000 A, 1800 - A) - (7000 A, 3800 - A ), RGB (0, ABS (255 - a / 10), 0) IF a> 2000 Timer1.Nabled = FALSE

Circle (2000, 6000 - a), 1500, RGB (0, 0, ABS (255 - A / 10)),, 0.4circle (9000, 6000 - a), 1500 - A / 2.5, RGB (ABS (255 - A / 10), 0, 0),, 0.4for B = 0 to 40 Step 0.1pset (3000 100 * B, 5000 - 300 * sin (b)), RGB (ABS (255 - A / 10) , ABS (255 - A / 10), 0) Nextend Sub

转载请注明原文地址:https://www.9cbs.com/read-26539.html

New Post(0)