Проект "Скринсейвер" - Visual Basic .NET

Узнай цену своей работы

Формулировка задачи:

Можно ли с помощью бейсик создать скринсейвер?

Решение задачи: «Проект "Скринсейвер"»

textual
Листинг программы
Public Class Form1
    Dim R As Single = 0
    Dim D As Integer = 10
    Dim T As Single
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        Close()
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim g As Graphics = Me.CreateGraphics
        Dim RandomByte(0) As Byte
        Dim Random As New Security.Cryptography.RNGCryptoServiceProvider()
        Dim I, O, H As Integer
        Random.GetBytes(RandomByte)
        I = Int(RandomByte(0) / 256 * 1280) + 1
        Random.GetBytes(RandomByte)
        O = Int(RandomByte(0) / 256 * 1024) + 1
        Random.GetBytes(RandomByte)
        H = Int(RandomByte(0) / 256 * D) + 1
        g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
        g.FillEllipse(Brushes.White, I, O, H, H)
        R = R + 1
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Black
        Me.WindowState = FormWindowState.Maximized
        Me.TopMost = True
    End Sub
End Class

Оцени полезность:

11   голосов , оценка 4.364 из 5