Visual Basic 中学校 掲示板 投稿の管理
タグのない投稿を抽出
統計
RSS
Visual Basic 中学校
投稿一覧
グラフィックス
この投稿へのリンク
https://keijiban.umayadia.com/ThreadDetail.aspx?ThreadId=57#CommentId363
この投稿の削除
削除パスワード
削除する
コメント本文
投稿者
ぼく(本物)
 (小学生)
投稿日時
2008/10/19 06:08:45
今日の勉強は終了。面白いなぁBasic.
Option Strict On
Imports System.Drawing.Drawing2D
'Button1とtime1コンポーネントが必要です(VisualBasic2008)
Public Class Form1
Private g1 As Graphics
Private r, g, b As Integer
Private kaiten As New Point(160.0F, 160.0F)
Private twoD As New Matrix
Private co_lor As SolidBrush
Private RND As System.Random
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
RND = New System.Random()
r = RND.Next(100)
g1.Transform = twoD
g = RND.Next(50, 255)
Threading.Thread.Sleep(10)
b = RND.Next(50, 255)
co_lor = New SolidBrush(Color.FromArgb(78, r, g, b))
twoD.RotateAt(6, kaiten, MatrixOrder.Append)
g1.FillEllipse(co_lor, 150, 150, 154, 154)
b = RND.Next(255)
co_lor = New SolidBrush(Color.FromArgb(78, 155, 155, b))
g1.FillEllipse(co_lor, 0, 0, 300, 300)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With Me.Timer1
.Interval = 200
.Enabled = True
End With
With Me
.Width = 350
.Height = 380
.BackColor = Color.Black
End With
Me.Button1.Visible = False
g1 = Me.CreateGraphics()
End Sub
End Class