Advertisement
benito

Untitled

Sep 7th, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 20.59 KB | None | 0 0
  1.     Imports System.Drawing.Drawing2D
  2.     Imports System.ComponentModel
  3.     Imports System.Runtime.InteropServices
  4.     MustInherit Class Theme
  5.         Inherits ContainerControl
  6.      
  7.     #Region " Initialization "
  8.      
  9.         Protected G As Graphics
  10.         Sub New()
  11.             SetStyle(DirectCast(139270, ControlStyles), True)
  12.         End Sub
  13.      
  14.         Private ParentIsForm As Boolean
  15.         Protected Overrides Sub OnHandleCreated(ByVal e As EventArgs)
  16.             Dock = DockStyle.Fill
  17.             ParentIsForm = TypeOf Parent Is Form
  18.             If ParentIsForm Then
  19.                 If Not _TransparencyKey = Color.Empty Then ParentForm.TransparencyKey = _TransparencyKey
  20.                 ParentForm.FormBorderStyle = FormBorderStyle.None
  21.             End If
  22.             MyBase.OnHandleCreated(e)
  23.         End Sub
  24.      
  25.         Overrides Property Text As String
  26.             Get
  27.                 Return MyBase.Text
  28.             End Get
  29.             Set(ByVal v As String)
  30.                 MyBase.Text = v
  31.                 Invalidate()
  32.             End Set
  33.         End Property
  34.     #End Region
  35.      
  36.     #Region " Sizing and Movement "
  37.      
  38.         Private _Resizable As Boolean = True
  39.         Property Resizable() As Boolean
  40.             Get
  41.                 Return _Resizable
  42.             End Get
  43.             Set(ByVal value As Boolean)
  44.                 _Resizable = value
  45.             End Set
  46.         End Property
  47.      
  48.         Private _MoveHeight As Integer = 24
  49.         Property MoveHeight() As Integer
  50.             Get
  51.                 Return _MoveHeight
  52.             End Get
  53.             Set(ByVal v As Integer)
  54.                 _MoveHeight = v
  55.                 Header = New Rectangle(7, 7, Width - 14, _MoveHeight - 7)
  56.             End Set
  57.         End Property
  58.      
  59.         Private Flag As IntPtr
  60.         Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
  61.             If Not e.Button = MouseButtons.Left Then Return
  62.             If ParentIsForm Then If ParentForm.WindowState = FormWindowState.Maximized Then Return
  63.      
  64.             If Header.Contains(e.Location) Then
  65.                 Flag = New IntPtr(2)
  66.             ElseIf Current.Position = 0 Or Not _Resizable Then
  67.                 Return
  68.             Else
  69.                 Flag = New IntPtr(Current.Position)
  70.             End If
  71.      
  72.             Capture = False
  73.             DefWndProc(Message.Create(Parent.Handle, 161, Flag, Nothing))
  74.      
  75.             MyBase.OnMouseDown(e)
  76.         End Sub
  77.      
  78.         Private Structure Pointer
  79.             ReadOnly Cursor As Cursor, Position As Byte
  80.             Sub New(ByVal c As Cursor, ByVal p As Byte)
  81.                 Cursor = c
  82.                 Position = p
  83.             End Sub
  84.         End Structure
  85.      
  86.         Private F1, F2, F3, F4 As Boolean, PTC As Point
  87.         Private Function GetPointer() As Pointer
  88.             PTC = PointToClient(MousePosition)
  89.             F1 = PTC.X < 7
  90.             F2 = PTC.X > Width - 7
  91.             F3 = PTC.Y < 7
  92.             F4 = PTC.Y > Height - 7
  93.      
  94.             If F1 And F3 Then Return New Pointer(Cursors.SizeNWSE, 13)
  95.             If F1 And F4 Then Return New Pointer(Cursors.SizeNESW, 16)
  96.             If F2 And F3 Then Return New Pointer(Cursors.SizeNESW, 14)
  97.             If F2 And F4 Then Return New Pointer(Cursors.SizeNWSE, 17)
  98.             If F1 Then Return New Pointer(Cursors.SizeWE, 10)
  99.             If F2 Then Return New Pointer(Cursors.SizeWE, 11)
  100.             If F3 Then Return New Pointer(Cursors.SizeNS, 12)
  101.             If F4 Then Return New Pointer(Cursors.SizeNS, 15)
  102.             Return New Pointer(Cursors.Default, 0)
  103.         End Function
  104.      
  105.         Private Current, Pending As Pointer
  106.         Private Sub SetCurrent()
  107.             Pending = GetPointer()
  108.             If Current.Position = Pending.Position Then Return
  109.             Current = GetPointer()
  110.             Cursor = Current.Cursor
  111.         End Sub
  112.      
  113.         Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
  114.             If _Resizable Then SetCurrent()
  115.             MyBase.OnMouseMove(e)
  116.         End Sub
  117.      
  118.         Protected Header As Rectangle
  119.         Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs)
  120.             If Width = 0 OrElse Height = 0 Then Return
  121.             Header = New Rectangle(7, 7, Width - 14, _MoveHeight - 7)
  122.             Invalidate()
  123.             MyBase.OnSizeChanged(e)
  124.         End Sub
  125.      
  126.     #End Region
  127.      
  128.     #Region " Convienence "
  129.      
  130.         MustOverride Sub PaintHook()
  131.         Protected NotOverridable Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  132.             If Width = 0 OrElse Height = 0 Then Return
  133.             G = e.Graphics
  134.             PaintHook()
  135.         End Sub
  136.      
  137.         Private _TransparencyKey As Color
  138.         Property TransparencyKey() As Color
  139.             Get
  140.                 Return _TransparencyKey
  141.             End Get
  142.             Set(ByVal v As Color)
  143.                 _TransparencyKey = v
  144.                 Invalidate()
  145.             End Set
  146.         End Property
  147.      
  148.         Private _Image As Image
  149.         Property Image() As Image
  150.             Get
  151.                 Return _Image
  152.             End Get
  153.             Set(ByVal value As Image)
  154.                 _Image = value
  155.                 Invalidate()
  156.             End Set
  157.         End Property
  158.         ReadOnly Property ImageWidth() As Integer
  159.             Get
  160.                 If _Image Is Nothing Then Return 0
  161.                 Return _Image.Width
  162.             End Get
  163.         End Property
  164.      
  165.         Private _Size As Size
  166.         Private _Rectangle As Rectangle
  167.         Private _Gradient As LinearGradientBrush
  168.         Private _Brush As SolidBrush
  169.      
  170.         Protected Sub DrawCorners(ByVal c As Color, ByVal rect As Rectangle)
  171.             _Brush = New SolidBrush(c)
  172.             G.FillRectangle(_Brush, rect.X, rect.Y, 1, 1)
  173.             G.FillRectangle(_Brush, rect.X + (rect.Width - 1), rect.Y, 1, 1)
  174.             G.FillRectangle(_Brush, rect.X, rect.Y + (rect.Height - 1), 1, 1)
  175.             G.FillRectangle(_Brush, rect.X + (rect.Width - 1), rect.Y + (rect.Height - 1), 1, 1)
  176.         End Sub
  177.      
  178.         Protected Sub DrawBorders(ByVal p1 As Pen, ByVal p2 As Pen, ByVal rect As Rectangle)
  179.             G.DrawRectangle(p1, rect.X, rect.Y, rect.Width - 1, rect.Height - 1)
  180.             G.DrawRectangle(p2, rect.X + 1, rect.Y + 1, rect.Width - 3, rect.Height - 3)
  181.         End Sub
  182.      
  183.         Protected Sub DrawText(ByVal a As HorizontalAlignment, ByVal c As Color, ByVal x As Integer)
  184.             DrawText(a, c, x, 0)
  185.         End Sub
  186.         Protected Sub DrawText(ByVal a As HorizontalAlignment, ByVal c As Color, ByVal x As Integer, ByVal y As Integer)
  187.             If String.IsNullOrEmpty(Text) Then Return
  188.             _Size = G.MeasureString(Text, Font).ToSize
  189.             _Brush = New SolidBrush(c)
  190.      
  191.             Select Case a
  192.                 Case HorizontalAlignment.Left
  193.                     G.DrawString(Text, Font, _Brush, x, _MoveHeight \ 2 - _Size.Height \ 2 + y)
  194.                 Case HorizontalAlignment.Right
  195.                     G.DrawString(Text, Font, _Brush, Width - _Size.Width - x, _MoveHeight \ 2 - _Size.Height \ 2 + y)
  196.                 Case HorizontalAlignment.Center
  197.                     G.DrawString(Text, Font, _Brush, Width \ 2 - _Size.Width \ 2 + x, _MoveHeight \ 2 - _Size.Height \ 2 + y)
  198.             End Select
  199.         End Sub
  200.      
  201.         Protected Sub DrawIcon(ByVal a As HorizontalAlignment, ByVal x As Integer)
  202.             DrawIcon(a, x, 0)
  203.         End Sub
  204.         Protected Sub DrawIcon(ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
  205.             If _Image Is Nothing Then Return
  206.             Select Case a
  207.                 Case HorizontalAlignment.Left
  208.                     G.DrawImage(_Image, x, _MoveHeight \ 2 - _Image.Height \ 2 + y)
  209.                 Case HorizontalAlignment.Right
  210.                     G.DrawImage(_Image, Width - _Image.Width - x, _MoveHeight \ 2 - _Image.Height \ 2 + y)
  211.                 Case HorizontalAlignment.Center
  212.                     G.DrawImage(_Image, Width \ 2 - _Image.Width \ 2, _MoveHeight \ 2 - _Image.Height \ 2)
  213.             End Select
  214.         End Sub
  215.      
  216.         Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
  217.             _Rectangle = New Rectangle(x, y, width, height)
  218.             _Gradient = New LinearGradientBrush(_Rectangle, c1, c2, angle)
  219.             G.FillRectangle(_Gradient, _Rectangle)
  220.         End Sub
  221.      
  222.     #End Region
  223.      
  224.     End Class
  225.     MustInherit Class ThemeControl
  226.         Inherits Control
  227.      
  228.     #Region " Initialization "
  229.      
  230.         Protected G As Graphics, B As Bitmap
  231.         Sub New()
  232.             SetStyle(DirectCast(139270, ControlStyles), True)
  233.             B = New Bitmap(1, 1)
  234.             G = Graphics.FromImage(B)
  235.         End Sub
  236.      
  237.         Sub AllowTransparent()
  238.             SetStyle(ControlStyles.Opaque, False)
  239.             SetStyle(ControlStyles.SupportsTransparentBackColor, True)
  240.         End Sub
  241.      
  242.         Overrides Property Text As String
  243.             Get
  244.                 Return MyBase.Text
  245.             End Get
  246.             Set(ByVal v As String)
  247.                 MyBase.Text = v
  248.                 Invalidate()
  249.             End Set
  250.         End Property
  251.     #End Region
  252.      
  253.     #Region " Mouse Handling "
  254.      
  255.         Protected Enum State As Byte
  256.             MouseNone = 0
  257.             MouseOver = 1
  258.             MouseDown = 2
  259.         End Enum
  260.      
  261.         Protected MouseState As State
  262.         Protected Overrides Sub OnMouseLeave(ByVal e As EventArgs)
  263.             ChangeMouseState(State.MouseNone)
  264.             MyBase.OnMouseLeave(e)
  265.         End Sub
  266.         Protected Overrides Sub OnMouseEnter(ByVal e As EventArgs)
  267.             ChangeMouseState(State.MouseOver)
  268.             MyBase.OnMouseEnter(e)
  269.         End Sub
  270.         Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
  271.             ChangeMouseState(State.MouseOver)
  272.             MyBase.OnMouseUp(e)
  273.         End Sub
  274.         Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
  275.             If e.Button = MouseButtons.Left Then ChangeMouseState(State.MouseDown)
  276.             MyBase.OnMouseDown(e)
  277.         End Sub
  278.      
  279.         Private Sub ChangeMouseState(ByVal e As State)
  280.             MouseState = e
  281.             Invalidate()
  282.         End Sub
  283.      
  284.     #End Region
  285.      
  286.     #Region " Convienence "
  287.      
  288.         MustOverride Sub PaintHook()
  289.         Protected NotOverridable Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  290.             If Width = 0 OrElse Height = 0 Then Return
  291.             PaintHook()
  292.             e.Graphics.DrawImage(B, 0, 0)
  293.         End Sub
  294.      
  295.         Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs)
  296.             If Not Width = 0 AndAlso Not Height = 0 Then
  297.                 B = New Bitmap(Width, Height)
  298.                 G = Graphics.FromImage(B)
  299.                 Invalidate()
  300.             End If
  301.             MyBase.OnSizeChanged(e)
  302.         End Sub
  303.      
  304.         Private _NoRounding As Boolean
  305.         Property NoRounding() As Boolean
  306.             Get
  307.                 Return _NoRounding
  308.             End Get
  309.             Set(ByVal v As Boolean)
  310.                 _NoRounding = v
  311.                 Invalidate()
  312.             End Set
  313.         End Property
  314.      
  315.         Private _Image As Image
  316.         Property Image() As Image
  317.             Get
  318.                 Return _Image
  319.             End Get
  320.             Set(ByVal value As Image)
  321.                 _Image = value
  322.                 Invalidate()
  323.             End Set
  324.         End Property
  325.         ReadOnly Property ImageWidth() As Integer
  326.             Get
  327.                 If _Image Is Nothing Then Return 0
  328.                 Return _Image.Width
  329.             End Get
  330.         End Property
  331.         ReadOnly Property ImageTop() As Integer
  332.             Get
  333.                 If _Image Is Nothing Then Return 0
  334.                 Return Height \ 2 - _Image.Height \ 2
  335.             End Get
  336.         End Property
  337.      
  338.         Private _Size As Size
  339.         Private _Rectangle As Rectangle
  340.         Private _Gradient As LinearGradientBrush
  341.         Private _Brush As SolidBrush
  342.      
  343.         Protected Sub DrawCorners(ByVal c As Color, ByVal rect As Rectangle)
  344.             If _NoRounding Then Return
  345.      
  346.             B.SetPixel(rect.X, rect.Y, c)
  347.             B.SetPixel(rect.X + (rect.Width - 1), rect.Y, c)
  348.             B.SetPixel(rect.X, rect.Y + (rect.Height - 1), c)
  349.             B.SetPixel(rect.X + (rect.Width - 1), rect.Y + (rect.Height - 1), c)
  350.         End Sub
  351.      
  352.         Protected Sub DrawBorders(ByVal p1 As Pen, ByVal p2 As Pen, ByVal rect As Rectangle)
  353.             G.DrawRectangle(p1, rect.X, rect.Y, rect.Width - 1, rect.Height - 1)
  354.             G.DrawRectangle(p2, rect.X + 1, rect.Y + 1, rect.Width - 3, rect.Height - 3)
  355.         End Sub
  356.      
  357.         Protected Sub DrawText(ByVal a As HorizontalAlignment, ByVal c As Color, ByVal x As Integer)
  358.             DrawText(a, c, x, 0)
  359.         End Sub
  360.         Protected Sub DrawText(ByVal a As HorizontalAlignment, ByVal c As Color, ByVal x As Integer, ByVal y As Integer)
  361.             If String.IsNullOrEmpty(Text) Then Return
  362.             _Size = G.MeasureString(Text, Font).ToSize
  363.             _Brush = New SolidBrush(c)
  364.      
  365.             Select Case a
  366.                 Case HorizontalAlignment.Left
  367.                     G.DrawString(Text, Font, _Brush, x, Height \ 2 - _Size.Height \ 2 + y)
  368.                 Case HorizontalAlignment.Right
  369.                     G.DrawString(Text, Font, _Brush, Width - _Size.Width - x, Height \ 2 - _Size.Height \ 2 + y)
  370.                 Case HorizontalAlignment.Center
  371.                     G.DrawString(Text, Font, _Brush, Width \ 2 - _Size.Width \ 2 + x, Height \ 2 - _Size.Height \ 2 + y)
  372.             End Select
  373.         End Sub
  374.      
  375.         Protected Sub DrawIcon(ByVal a As HorizontalAlignment, ByVal x As Integer)
  376.             DrawIcon(a, x, 0)
  377.         End Sub
  378.         Protected Sub DrawIcon(ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
  379.             If _Image Is Nothing Then Return
  380.             Select Case a
  381.                 Case HorizontalAlignment.Left
  382.                     G.DrawImage(_Image, x, Height \ 2 - _Image.Height \ 2 + y)
  383.                 Case HorizontalAlignment.Right
  384.                     G.DrawImage(_Image, Width - _Image.Width - x, Height \ 2 - _Image.Height \ 2 + y)
  385.                 Case HorizontalAlignment.Center
  386.                     G.DrawImage(_Image, Width \ 2 - _Image.Width \ 2, Height \ 2 - _Image.Height \ 2)
  387.             End Select
  388.         End Sub
  389.      
  390.         Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
  391.             _Rectangle = New Rectangle(x, y, width, height)
  392.             _Gradient = New LinearGradientBrush(_Rectangle, c1, c2, angle)
  393.             G.FillRectangle(_Gradient, _Rectangle)
  394.         End Sub
  395.     #End Region
  396.      
  397.     End Class
  398.     MustInherit Class ThemeContainerControl
  399.         Inherits ContainerControl
  400.      
  401.     #Region " Initialization "
  402.      
  403.         Protected G As Graphics, B As Bitmap
  404.         Sub New()
  405.             SetStyle(DirectCast(139270, ControlStyles), True)
  406.             B = New Bitmap(1, 1)
  407.             G = Graphics.FromImage(B)
  408.         End Sub
  409.      
  410.         Sub AllowTransparent()
  411.             SetStyle(ControlStyles.Opaque, False)
  412.             SetStyle(ControlStyles.SupportsTransparentBackColor, True)
  413.         End Sub
  414.      
  415.     #End Region
  416.      
  417.     #Region " Convienence "
  418.      
  419.         MustOverride Sub PaintHook()
  420.         Protected NotOverridable Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  421.             If Width = 0 OrElse Height = 0 Then Return
  422.             PaintHook()
  423.             e.Graphics.DrawImage(B, 0, 0)
  424.         End Sub
  425.      
  426.         Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs)
  427.             If Not Width = 0 AndAlso Not Height = 0 Then
  428.                 B = New Bitmap(Width, Height)
  429.                 G = Graphics.FromImage(B)
  430.                 Invalidate()
  431.             End If
  432.             MyBase.OnSizeChanged(e)
  433.         End Sub
  434.      
  435.         Private _NoRounding As Boolean
  436.         Property NoRounding() As Boolean
  437.             Get
  438.                 Return _NoRounding
  439.             End Get
  440.             Set(ByVal v As Boolean)
  441.                 _NoRounding = v
  442.                 Invalidate()
  443.             End Set
  444.         End Property
  445.      
  446.         Private _Rectangle As Rectangle
  447.         Private _Gradient As LinearGradientBrush
  448.      
  449.         Protected Sub DrawCorners(ByVal c As Color, ByVal rect As Rectangle)
  450.             If _NoRounding Then Return
  451.             B.SetPixel(rect.X, rect.Y, c)
  452.             B.SetPixel(rect.X + (rect.Width - 1), rect.Y, c)
  453.             B.SetPixel(rect.X, rect.Y + (rect.Height - 1), c)
  454.             B.SetPixel(rect.X + (rect.Width - 1), rect.Y + (rect.Height - 1), c)
  455.         End Sub
  456.      
  457.         Protected Sub DrawBorders(ByVal p1 As Pen, ByVal p2 As Pen, ByVal rect As Rectangle)
  458.             G.DrawRectangle(p1, rect.X, rect.Y, rect.Width - 1, rect.Height - 1)
  459.             G.DrawRectangle(p2, rect.X + 1, rect.Y + 1, rect.Width - 3, rect.Height - 3)
  460.         End Sub
  461.      
  462.         Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
  463.             _Rectangle = New Rectangle(x, y, width, height)
  464.             _Gradient = New LinearGradientBrush(_Rectangle, c1, c2, angle)
  465.             G.FillRectangle(_Gradient, _Rectangle)
  466.         End Sub
  467.     #End Region
  468.      
  469.     End Class
  470.      
  471.     Class YTTheme
  472.         Inherits Theme
  473.         Sub New()
  474.             Resizable = False
  475.             Font = New Font("Verdana", 8.25!)
  476.             ForeColor = Color.White
  477.             BackColor = Color.White
  478.             TransparencyKey = Color.Fuchsia
  479.             MoveHeight = 20
  480.         End Sub
  481.         Overrides Sub PaintHook()
  482.             G.Clear(BackColor)
  483.             DrawGradient(Color.DarkRed, Color.Red, 0, 0, Width, 20, 90S)
  484.             DrawGradient(Color.White, Color.LightGray, 0, 20, Width, Height - 25, 90S)
  485.             DrawGradient(Color.DarkRed, Color.Red, 0, Height - 25, Width, Height + 25 - Height, 90S)
  486.             DrawGradient(Color.DarkRed, Color.Red, 0, Height + 25 - Height - 5, 10, Height - 45, 180S)
  487.             DrawGradient(Color.Red, Color.DarkRed, Width - 10, Height + 25 - Height - 5, 10, Height - 45, 180S)
  488.             DrawCorners(Color.Fuchsia, ClientRectangle)
  489.             DrawText(HorizontalAlignment.Center, ForeColor, ImageWidth)
  490.             DrawBorders(Pens.DarkRed, Pens.White, ClientRectangle)
  491.         End Sub
  492.     End Class
  493.     Class YTButton
  494.         Inherits ThemeControl
  495.      
  496.         Public Overrides Sub PaintHook()
  497.             If MouseState = State.MouseDown Then
  498.                 DrawGradient(Color.Red, Color.DarkRed, 0, 0, Width, Height, 90S)
  499.             ElseIf MouseState = State.MouseOver Then
  500.                 DrawGradient(Color.DarkRed, Color.Red, 0, 0, Width, Height, 90S)
  501.             Else
  502.                 DrawGradient(Color.Red, Color.DarkRed, 0, 0, Width, Height, 90S)
  503.             End If
  504.             DrawText(HorizontalAlignment.Center, ForeColor, 0)
  505.             DrawBorders(Pens.Red, Pens.White, ClientRectangle)
  506.         End Sub
  507.     End Class
  508.      
  509.     Class YTProgressBar
  510.         Inherits ThemeControl
  511.      
  512.         Private _Maximum As Integer = 100
  513.         Public Property Maximum() As Integer
  514.             Get
  515.                 Return _Maximum
  516.             End Get
  517.             Set(ByVal value As Integer)
  518.                 If value < 1 Then value = 1
  519.                 If value < _Value Then _Value = value
  520.                 _Maximum = value
  521.                 Invalidate()
  522.             End Set
  523.         End Property
  524.      
  525.         Private _Value As Integer = 50
  526.         Public Property Value() As Integer
  527.             Get
  528.                 Return _Value
  529.             End Get
  530.             Set(ByVal value As Integer)
  531.                 If value > _Maximum Then value = _Maximum
  532.                 If value < 1 Then value = 1
  533.                 _Value = value
  534.                 Invalidate()
  535.             End Set
  536.         End Property
  537.      
  538.         Overrides Sub PaintHook()
  539.             G.Clear(Color.DarkRed)
  540.             If (_Value > 0) Then
  541.                 DrawGradient(Color.Red, Color.DarkRed, 0, 0, CInt((_Value / _Maximum) * Width), Height, 90S)
  542.             End If
  543.             G.DrawRectangle(Pens.White, 0, 0, Width - 1, Height - 1)
  544.             DrawBorders(Pens.DarkRed, Pens.White, ClientRectangle)
  545.         End Sub
  546.     End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement