VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Very Cool Graphics With Lines using only 11 lines of code

by ReXz (9 Submissions)
Category: Graphics
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

This code draws a nice, very cool gradient field with a nice sidebar using line(see screenshot) Please rate it! (Thnx!).

Inputs
The only thing you need to do is to set the scalemode on the form to 'Pixel' and the backcolor to black and insert a timer called 'timer1' with interval : 1
Assumes
You can set the color to draw by setting the RGB value to rgb(0,red,0) or rgb(red,0,0) etc. You can also change the graphic resolution by changing the 'lY1 = lY1' command.
API Declarations
Dim lY1 As Integer
Dim Red As Integer

Rate Very Cool Graphics With Lines using only 11 lines of code

Private Sub Form_Load()
Red = 0
End Sub
Private Sub Timer1_Timer()
Red = Red + 1
If Red < 255 Then
Me.ForeColor = RGB(0, Red, 0)
ElseIf Red > 254 Then
End If
lY1 = lY1 + 3
Me.Line (0, lY1)-(Me.ScaleWidth, lY1)
Me.Line (ly1, 0)-(Me.ScaleHeight, lY1)
End Sub

Download this snippet    Add to My Saved Code

Very Cool Graphics With Lines using only 11 lines of code Comments

No comments have been posted about Very Cool Graphics With Lines using only 11 lines of code. Why not be the first to post a comment about Very Cool Graphics With Lines using only 11 lines of code.

Post your comment

Subject:
Message:
0/1000 characters