Visual Basic 中学校 掲示板 投稿の管理
タグのない投稿を抽出
統計
RSS
Visual Basic 中学校
投稿一覧
くるくる回る色を教えて。
この投稿へのリンク
https://keijiban.umayadia.com/ThreadDetail.aspx?ThreadId=47#CommentId319
この投稿の削除
削除パスワード
削除する
コメント本文
投稿者
ぼく
 (小学生)
投稿日時
2008/10/16 22:26:26
うへぇ~。。がーーん!むずかしぞ!ARGBめ
VisualBasic2008(無料版)
Dim g As Graphics = e.Graphics
' Transparent red, green, and blue brushes.
Dim trnsRedBrush As New SolidBrush(Color.FromArgb(&H78FF0000))
Dim trnsGreenBrush As New SolidBrush(Color.FromArgb(&H7800FF00))
Dim trnsBlueBrush As New SolidBrush(Color.FromArgb(&H780000FF))
' Base and height of the triangle that is used to position the
' circles. Each vertex of the triangle is at the center of one of
' the 3 circles. The base is equal to the diameter of the circle.
Dim triBase As Single = 100
Dim triHeight As Single = CSng(Math.Sqrt((3 * (triBase * _
triBase) / 4)))
' Coordinates of first circle
's bounding rectangle.
Dim x1 As Single = 40
Dim y1 As Single = 40
' Fill 3 over-lapping circles. Each circle is a different color.
g.FillEllipse(trnsRedBrush, x1, y1, 2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsGreenBrush, x1 + triBase / 2, y1 + triHeight, _
2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsBlueBrush, x1 + triBase, y1, 2 * triHeight, _
2 * triHeight)
ん\form1_paintイベント内