VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is an easy form to make and would make a cool screen saver. It draws a circle in lots of color

by Eric Zahler (2 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 16th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is an easy form to make and would make a cool screen saver. It draws a circle in lots of colors and dots at the same time.......

API Declarations


Public Sub drawcircle()
Dim red As Integer 'declare all varibles
Dim blue As Integer
Dim green As Integer
Dim xPos As Integer
Dim yPos As Integer
red = 255 * Rnd 'randomize red color
blue = 255 * Rnd 'randomize blue color
green = 255 * Rnd 'randomize green color
xPos = ScaleWidth / 2
yPos = ScaleHeight / 2
radius = ((yPos * 0.99) + 1) * Rnd
Circle (xPos, yPos), radius, RGB(red, blue, green)
End Sub


Rate This is an easy form to make and would make a cool screen saver. It draws a circle in lots of color




End Sub

Private Sub Timer1_Timer()
'Form1.WindowState = 2
Call drawcircle
End Sub
Public Sub PixelSet() 'call pixelset
Dim red As Integer 'declare all varibles
Dim blue As Integer
Dim green As Integer
Dim randomx As Integer
Dim randomy As Integer
Dim x As Integer
Do Until x = 999
x = x + 1
red = 255 * Rnd
blue = 255 * Rnd
green = 255 * Rnd
randomx = Rnd * ScaleWidth
randomy = Rnd * ScaleWidth
PSet (randomx, randomy), RGB(red, green, blue)
Loop
End Sub

Private Sub Timer2_Timer()


Call PixelSet
End Sub




Download this snippet    Add to My Saved Code

This is an easy form to make and would make a cool screen saver. It draws a circle in lots of color Comments

No comments have been posted about This is an easy form to make and would make a cool screen saver. It draws a circle in lots of color. Why not be the first to post a comment about This is an easy form to make and would make a cool screen saver. It draws a circle in lots of color.

Post your comment

Subject:
Message:
0/1000 characters