Private Sub Form1_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles _
MyBase.Paint
Dim y As Integer = 10
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ActiveBorder, "ActiveBorder")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ActiveCaption, "ActiveCaption")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ActiveCaptionText, _
"ActiveCaptionText")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.AppWorkspace, "AppWorkspace")
DrawBrushSample(e.Graphics, y, SystemBrushes.Control, _
"Control")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ControlDark, "ControlDark")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ControlDarkDark, "ControlDarkDark")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ControlLight, "ControlLight")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ControlLightLight, _
"ControlLightLight")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.ControlText, "ControlText")
DrawBrushSample(e.Graphics, y, SystemBrushes.Desktop, _
"Desktop")
DrawBrushSample(e.Graphics, y, SystemBrushes.Highlight, _
"Highlight")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.HighlightText, "HighlightText")
DrawBrushSample(e.Graphics, y, SystemBrushes.HotTrack, _
"HotTrack")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.InactiveBorder, "InactiveBorder")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.InactiveCaption, "InactiveCaption")
DrawBrushSample(e.Graphics, y, SystemBrushes.Info, _
"Info")
DrawBrushSample(e.Graphics, y, SystemBrushes.Menu, _
"Menu")
DrawBrushSample(e.Graphics, y, SystemBrushes.ScrollBar, _
"ScrollBar")
DrawBrushSample(e.Graphics, y, SystemBrushes.Window, _
"Window")
DrawBrushSample(e.Graphics, y, _
SystemBrushes.WindowText, "WindowText")
End Sub
Private Sub DrawBrushSample(ByVal gr As Graphics, ByRef y _
As Integer, ByVal br As Brush, ByVal br_name As String)
gr.FillRectangle(br, 10, y, 90, 10)
gr.DrawRectangle(Pens.Black, 10, y, 90, 10)
gr.DrawString(br_name, Me.Font, Brushes.Black, 110, y)
y += 15
End Sub
|