Advertisement
Finessed

Winter Theme

Dec 3rd, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 37.39 KB | None | 0 0
  1. Imports System.Drawing
  2. Imports System.Drawing.Drawing2D
  3. Imports System.ComponentModel
  4. Imports System.Drawing.Text
  5.  
  6. ' Get more free themes at ThemesVB.NET
  7.  
  8. Enum MouseState
  9.     None = 0
  10.     Over = 1
  11.     Down = 2
  12. End Enum
  13.  
  14. Class WinterTheme
  15.     Inherits ContainerControl
  16.  
  17. #Region " Declarations "
  18.     Private _Down As Boolean = False
  19.     Private _Header As Integer = 31
  20.     Private _MousePoint As Point
  21. #End Region
  22.  
  23. #Region " Mouse States "
  24.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  25.         MyBase.OnMouseUp(e)
  26.         _Down = False
  27.     End Sub
  28.  
  29.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  30.         MyBase.OnMouseDown(e)
  31.         If e.Location.Y < _Header AndAlso e.Button = Windows.Forms.MouseButtons.Left Then
  32.             _MousePoint = e.Location
  33.             _Down = True
  34.         End If
  35.     End Sub
  36.  
  37.     Protected Overrides Sub OnMouseMove(e As MouseEventArgs)
  38.         MyBase.OnMouseMove(e)
  39.         If _Down = True Then
  40.             ParentForm.Location = MousePosition - _MousePoint
  41.         End If
  42.     End Sub
  43. #End Region
  44. ' Get more free themes at ThemesVB.NET
  45.     Protected Overrides Sub OnCreateControl()
  46.         MyBase.OnCreateControl()
  47.         ParentForm.FormBorderStyle = FormBorderStyle.None
  48.         ParentForm.TransparencyKey = Color.Fuchsia
  49.         Dock = DockStyle.Fill
  50.         Invalidate()
  51.     End Sub
  52.  
  53.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  54.         MyBase.OnPaint(e)
  55.         Dim G = e.Graphics
  56.         G.Clear(Color.FromArgb(40, 40, 40))
  57.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, _Header, Width, Height - _Header))
  58.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(0, 0, 1, 1))
  59.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(1, 0, 1, 1))
  60.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(0, 1, 1, 1))
  61.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 1, 0, 1, 1))
  62.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 2, 0, 1, 1))
  63.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 1, 1, 1, 1))
  64.  
  65.         Dim _StringF As New StringFormat
  66.         _StringF.Alignment = StringAlignment.Center
  67.         _StringF.LineAlignment = StringAlignment.Center
  68.         G.DrawString(Text, New Font("Segoe UI", 11), Brushes.White, New RectangleF(0, 0, Width, _Header), _StringF)
  69.     End Sub
  70. End Class
  71.  
  72. Class WinterControlBox
  73.     Inherits Control
  74.  
  75. #Region " Declarations "
  76.     Private _State As MouseState = MouseState.None
  77.     Private _MousePoint As Integer
  78. #End Region
  79.  
  80. #Region " Mouse States "
  81.  
  82.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  83.         MyBase.OnMouseDown(e)
  84.         _State = MouseState.Down
  85.         Invalidate()
  86.     End Sub
  87.  
  88.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  89.         MyBase.OnMouseUp(e)
  90.         _State = MouseState.Over
  91.         Invalidate()
  92.     End Sub
  93.  
  94.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  95.         MyBase.OnMouseEnter(e)
  96.         _State = MouseState.Over
  97.         Invalidate()
  98.     End Sub
  99.  
  100.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  101.         MyBase.OnMouseLeave(e)
  102.         _State = MouseState.None
  103.         Invalidate()
  104.     End Sub
  105.  
  106.     Protected Overrides Sub OnMouseMove(e As MouseEventArgs)
  107.         MyBase.OnMouseMove(e)
  108.         _MousePoint = e.X
  109.         Invalidate()
  110.     End Sub
  111.  
  112. #End Region
  113. ' Get more free themes at ThemesVB.NET
  114. #Region " Properties "
  115.  
  116.     Sub New()
  117.         Size = New Size(60, 31)
  118.         Invalidate()
  119.     End Sub
  120.  
  121.     Protected Overrides Sub OnResize(e As EventArgs)
  122.         MyBase.OnResize(e)
  123.         Size = New Size(60, 31)
  124.         Invalidate()
  125.     End Sub
  126.  
  127.     Protected Overrides Sub OnCreateControl()
  128.         MyBase.OnCreateControl()
  129.         Dock = DockStyle.Right
  130.         Invalidate()
  131.     End Sub
  132.  
  133.     Protected Overrides Sub OnClick(e As EventArgs)
  134.         MyBase.OnClick(e)
  135.         If _MousePoint > 30 Then
  136.             FindForm.Close()
  137.         Else
  138.             FindForm.WindowState = FormWindowState.Minimized
  139.         End If
  140.     End Sub
  141.  
  142. #End Region
  143.  
  144.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  145.         MyBase.OnPaint(e)
  146.         Dim G = e.Graphics
  147.         G.Clear(Color.FromArgb(28, 28, 28))
  148.  
  149.         Select Case _State
  150.             Case MouseState.Over
  151.                 If _MousePoint > 30 Then
  152.                     G.FillRectangle(New SolidBrush(Color.FromArgb(30, Color.White)), New Rectangle(30, 0, 30, 31))
  153.                 Else
  154.                     G.FillRectangle(New SolidBrush(Color.FromArgb(30, Color.White)), New Rectangle(0, 0, 30, 31))
  155.                 End If
  156.  
  157.             Case MouseState.Down
  158.                 If _MousePoint > 30 Then
  159.                     G.FillRectangle(New SolidBrush(Color.FromArgb(70, Color.Black)), New Rectangle(30, 0, 30, 31))
  160.                 Else
  161.                     G.FillRectangle(New SolidBrush(Color.FromArgb(70, Color.Black)), New Rectangle(0, 0, 30, 31))
  162.                 End If
  163.         End Select
  164.  
  165.         Dim _StringF As New StringFormat
  166.         _StringF.Alignment = StringAlignment.Center
  167.         _StringF.LineAlignment = StringAlignment.Center
  168.         G.DrawString("r", New Font("Marlett", 11), Brushes.White, New RectangleF(Width - 30, 0, 30, 30), _StringF)
  169.  
  170.         G.FillRectangle(Brushes.White, New Rectangle(Width - 50, 14, 10, 3))
  171.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 1, 0, 1, 1))
  172.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 2, 0, 1, 1))
  173.         G.FillRectangle(Brushes.Fuchsia, New Rectangle(Width - 1, 1, 1, 1))
  174.     End Sub
  175.  
  176. End Class
  177.  
  178. Class WinterButtonBlue
  179.     Inherits Control
  180.  
  181. #Region " Declarations "
  182.     Private _State As MouseState = MouseState.None
  183. #End Region
  184.  
  185. #Region " Mouse States "
  186.  
  187.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  188.         MyBase.OnMouseEnter(e)
  189.         _State = MouseState.Over
  190.         Invalidate()
  191.     End Sub
  192.  
  193.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  194.         MyBase.OnMouseLeave(e)
  195.         _State = MouseState.None
  196.         Invalidate()
  197.     End Sub
  198.  
  199.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  200.         MyBase.OnMouseDown(e)
  201.         _State = MouseState.Down
  202.         Invalidate()
  203.     End Sub
  204.  
  205.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  206.         MyBase.OnMouseUp(e)
  207.         _State = MouseState.Over
  208.         Invalidate()
  209.     End Sub
  210.  
  211. #End Region
  212.  
  213.     Sub New()
  214.         Size = New Size(100, 40)
  215.     End Sub
  216.  
  217.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  218.         MyBase.OnPaint(e)
  219.         Dim G = e.Graphics
  220.         G.Clear(Color.FromArgb(61, 132, 221))
  221.         G.FillRectangle(New SolidBrush(Color.FromArgb(78, 148, 235)), New Rectangle(0, 0, Width, Height / 2))
  222.  
  223.         Select Case _State
  224.             Case MouseState.Over
  225.                 G.FillRectangle(New SolidBrush(Color.FromArgb(20, Color.White)), New Rectangle(0, 0, Width, Height))
  226.             Case MouseState.Down
  227.                 G.FillRectangle(New SolidBrush(Color.FromArgb(30, Color.Black)), New Rectangle(0, 0, Width, Height))
  228.         End Select
  229.  
  230.         Dim _StringF As New StringFormat
  231.         _StringF.Alignment = StringAlignment.Center
  232.         _StringF.LineAlignment = StringAlignment.Center
  233.         G.DrawString(Text, New Font("Segoe UI", 10), Brushes.White, New RectangleF(0, 0, Width, Height), _StringF)
  234.  
  235.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  236.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 1, 1, 1))
  237.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, 0, 1, 1))
  238.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 0, 1, 1))
  239.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 1, 1, 1))
  240.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, 0, 1, 1))
  241.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 1, 1, 1))
  242.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 2, 1, 1))
  243.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, Height - 1, 1, 1))
  244.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 1, 1, 1))
  245.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 2, 1, 1))
  246.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, Height - 1, 1, 1))
  247.  
  248.     End Sub
  249.  
  250. End Class
  251.  
  252. Class WinterButtonBlack
  253.     Inherits Control
  254.  
  255. #Region " Declarations "
  256.     Private _State As MouseState = MouseState.None
  257. #End Region
  258.  
  259. #Region " Mouse States "
  260.  
  261.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  262.         MyBase.OnMouseEnter(e)
  263.         _State = MouseState.Over
  264.         Invalidate()
  265.     End Sub
  266.  
  267.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  268.         MyBase.OnMouseLeave(e)
  269.         _State = MouseState.None
  270.         Invalidate()
  271.     End Sub
  272.  
  273.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  274.         MyBase.OnMouseDown(e)
  275.         _State = MouseState.Down
  276.         Invalidate()
  277.     End Sub
  278.  
  279.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  280.         MyBase.OnMouseUp(e)
  281.         _State = MouseState.Over
  282.         Invalidate()
  283.     End Sub
  284.  
  285. #End Region
  286.  
  287.     Sub New()
  288.         Size = New Size(100, 40)
  289.     End Sub
  290.  
  291.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  292.         MyBase.OnPaint(e)
  293.         Dim G = e.Graphics
  294.         G.Clear(Color.FromArgb(28, 28, 28))
  295.         G.FillRectangle(New SolidBrush(Color.FromArgb(51, 51, 51)), New Rectangle(0, 0, Width, Height / 2))
  296.  
  297.         Select Case _State
  298.             Case MouseState.Over
  299.                 G.FillRectangle(New SolidBrush(Color.FromArgb(10, Color.White)), New Rectangle(0, 0, Width, Height))
  300.             Case MouseState.Down
  301.                 G.FillRectangle(New SolidBrush(Color.FromArgb(30, Color.Black)), New Rectangle(0, 0, Width, Height))
  302.         End Select
  303.  
  304.         Dim _StringF As New StringFormat
  305.         _StringF.Alignment = StringAlignment.Center
  306.         _StringF.LineAlignment = StringAlignment.Center
  307.         G.DrawString(Text, New Font("Segoe UI", 10), Brushes.White, New RectangleF(0, 0, Width, Height), _StringF)
  308.  
  309.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  310.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 1, 1, 1))
  311.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, 0, 1, 1))
  312.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 0, 1, 1))
  313.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 1, 1, 1))
  314.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, 0, 1, 1))
  315.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 1, 1, 1))
  316.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 2, 1, 1))
  317.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, Height - 1, 1, 1))
  318.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 1, 1, 1))
  319.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 2, 1, 1))
  320.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, Height - 1, 1, 1))
  321.  
  322.     End Sub
  323.  
  324. End Class
  325.  
  326. <DefaultEvent("CheckedChanged")>
  327. Class WinterRadioButtonBlue
  328.     Inherits Control
  329.  
  330. #Region " Declarations "
  331.     Private _Checked As Boolean
  332.     Private _State As MouseState = MouseState.None
  333. #End Region
  334.  
  335. #Region " Mouse States "
  336.  
  337.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  338.         MyBase.OnMouseEnter(e)
  339.         _State = MouseState.Over
  340.         Invalidate()
  341.     End Sub
  342.  
  343.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  344.         MyBase.OnMouseLeave(e)
  345.         _State = MouseState.None
  346.         Invalidate()
  347.     End Sub
  348.  
  349.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  350.         MyBase.OnMouseUp(e)
  351.         _State = MouseState.Over
  352.         Invalidate()
  353.     End Sub
  354.  
  355.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  356.         MyBase.OnMouseDown(e)
  357.         _State = MouseState.Down
  358.         Invalidate()
  359.     End Sub
  360.  
  361. #End Region
  362.  
  363. #Region " Properties "
  364.     Property Checked() As Boolean
  365.         Get
  366.             Return _Checked
  367.         End Get
  368.         Set(value As Boolean)
  369.             _Checked = value
  370.             InvalidateControls()
  371.             RaiseEvent CheckedChanged(Me)
  372.             Invalidate()
  373.         End Set
  374.     End Property
  375.     Event CheckedChanged(ByVal sender As Object)
  376.     Protected Overrides Sub OnClick(e As EventArgs)
  377.         If Not _Checked Then Checked = True
  378.         MyBase.OnClick(e)
  379.     End Sub
  380.     Private Sub InvalidateControls()
  381.         If Not IsHandleCreated OrElse Not _Checked Then Return
  382.         For Each C As Control In Parent.Controls
  383.             If C IsNot Me AndAlso TypeOf C Is WinterRadioButtonBlue Then
  384.                 DirectCast(C, WinterRadioButtonBlue).Checked = False
  385.                 Invalidate()
  386.             End If
  387.         Next
  388.     End Sub
  389.     Protected Overrides Sub OnCreateControl()
  390.         MyBase.OnCreateControl()
  391.         InvalidateControls()
  392.     End Sub
  393.  
  394.  
  395.     Protected Overrides Sub OnResize(e As EventArgs)
  396.         MyBase.OnResize(e)
  397.         Height = 16
  398.     End Sub
  399.  
  400. #End Region
  401.  
  402.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  403.         MyBase.OnPaint(e)
  404.         Dim G = e.Graphics
  405.         G.SmoothingMode = 2
  406.         G.TextRenderingHint = 5
  407.  
  408.         G.Clear(Color.FromArgb(211, 222, 228))
  409.  
  410.  
  411.         G.FillEllipse(New SolidBrush(Color.FromArgb(61, 132, 221)), New Rectangle(0, 0, 15, 15))
  412.  
  413.         Select Case _State
  414.             Case MouseState.Over
  415.                 G.FillEllipse(New SolidBrush(Color.FromArgb(78, 148, 235)), New Rectangle(0, 0, 15, 15))
  416.             Case MouseState.Down
  417.                 G.FillEllipse(New SolidBrush(Color.FromArgb(15, Color.Black)), New Rectangle(0, 0, 15, 15))
  418.         End Select
  419.  
  420.         If Checked Then
  421.             G.FillEllipse(New SolidBrush(Color.FromArgb(45, 47, 49)), New Rectangle(4, 4, 7, 7))
  422.  
  423.         End If
  424.         G.DrawString(Text, New Font("Segoe UI", 10), New SolidBrush(Color.FromArgb(45, 47, 49)), New Point(18, -2))
  425.     End Sub
  426.  
  427. End Class
  428. ' Get more free themes at ThemesVB.NET
  429. <DefaultEvent("CheckedChanged")>
  430. Class WinterRadioButtonBlack
  431.     Inherits Control
  432.  
  433. #Region " Declarations "
  434.     Private _Checked As Boolean
  435.     Private _State As MouseState = MouseState.None
  436. #End Region
  437.  
  438. #Region " Mouse States "
  439.  
  440.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  441.         MyBase.OnMouseEnter(e)
  442.         _State = MouseState.Over
  443.         Invalidate()
  444.     End Sub
  445.  
  446.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  447.         MyBase.OnMouseLeave(e)
  448.         _State = MouseState.None
  449.         Invalidate()
  450.     End Sub
  451.  
  452.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  453.         MyBase.OnMouseUp(e)
  454.         _State = MouseState.Over
  455.         Invalidate()
  456.     End Sub
  457.  
  458.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  459.         MyBase.OnMouseDown(e)
  460.         _State = MouseState.Down
  461.         Invalidate()
  462.     End Sub
  463.  
  464. #End Region
  465.  
  466. #Region " Properties "
  467.     Property Checked() As Boolean
  468.         Get
  469.             Return _Checked
  470.         End Get
  471.         Set(value As Boolean)
  472.             _Checked = value
  473.             InvalidateControls()
  474.             RaiseEvent CheckedChanged(Me)
  475.             Invalidate()
  476.         End Set
  477.     End Property
  478.     Event CheckedChanged(ByVal sender As Object)
  479.     Protected Overrides Sub OnClick(e As EventArgs)
  480.         If Not _Checked Then Checked = True
  481.         MyBase.OnClick(e)
  482.     End Sub
  483.     Private Sub InvalidateControls()
  484.         If Not IsHandleCreated OrElse Not _Checked Then Return
  485.         For Each C As Control In Parent.Controls
  486.             If C IsNot Me AndAlso TypeOf C Is WinterRadioButtonBlack Then
  487.                 DirectCast(C, WinterRadioButtonBlack).Checked = False
  488.                 Invalidate()
  489.             End If
  490.         Next
  491.     End Sub
  492.     Protected Overrides Sub OnCreateControl()
  493.         MyBase.OnCreateControl()
  494.         InvalidateControls()
  495.     End Sub
  496.  
  497.  
  498.     Protected Overrides Sub OnResize(e As EventArgs)
  499.         MyBase.OnResize(e)
  500.         Height = 16
  501.     End Sub
  502.  
  503. #End Region
  504.  
  505.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  506.         MyBase.OnPaint(e)
  507.         Dim G = e.Graphics
  508.         G.SmoothingMode = 2
  509.         G.TextRenderingHint = 5
  510.  
  511.         G.Clear(Color.FromArgb(211, 222, 228))
  512.  
  513.  
  514.         G.FillEllipse(New SolidBrush(Color.FromArgb(37, 38, 39)), New Rectangle(0, 0, 15, 15))
  515.  
  516.         Select Case _State
  517.             Case MouseState.Over
  518.                 G.FillEllipse(New SolidBrush(Color.FromArgb(50, 52, 57)), New Rectangle(0, 0, 15, 15))
  519.             Case MouseState.Down
  520.                 G.FillEllipse(New SolidBrush(Color.FromArgb(15, Color.Black)), New Rectangle(0, 0, 15, 15))
  521.         End Select
  522.  
  523.         If Checked Then
  524.             G.FillEllipse(Brushes.White, New Rectangle(4, 4, 7, 7))
  525.  
  526.         End If
  527.         G.DrawString(Text, New Font("Segoe UI", 10), New SolidBrush(Color.FromArgb(45, 47, 49)), New Point(18, -2))
  528.     End Sub
  529.  
  530. End Class
  531.  
  532. <DefaultEvent("CheckedChanged")>
  533. Class WinterCheckBoxBlue
  534.     Inherits Control
  535.  
  536. #Region " Variables "
  537.     Private _State As MouseState = MouseState.None
  538.     Private _Checked As Boolean
  539. #End Region
  540.  
  541. #Region " Properties "
  542.     Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  543.         MyBase.OnTextChanged(e)
  544.         Invalidate()
  545.     End Sub
  546.  
  547.     Property Checked() As Boolean
  548.         Get
  549.             Return _Checked
  550.         End Get
  551.         Set(ByVal value As Boolean)
  552.             _Checked = value
  553.             Invalidate()
  554.         End Set
  555.     End Property
  556.  
  557.     Event CheckedChanged(ByVal sender As Object)
  558.     Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
  559.         _Checked = Not _Checked
  560.         RaiseEvent CheckedChanged(Me)
  561.         MyBase.OnClick(e)
  562.     End Sub
  563.  
  564.     Protected Overrides Sub OnResize(e As EventArgs)
  565.         MyBase.OnResize(e)
  566.         Height = 16
  567.     End Sub
  568.  
  569. #End Region
  570.  
  571. #Region " Mouse States "
  572.  
  573.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  574.         MyBase.OnMouseDown(e)
  575.         _State = MouseState.Down
  576.         Invalidate()
  577.     End Sub
  578.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  579.         MyBase.OnMouseUp(e)
  580.         _State = MouseState.Over
  581.         Invalidate()
  582.     End Sub
  583.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  584.         MyBase.OnMouseEnter(e)
  585.         _State = MouseState.Over
  586.         Invalidate()
  587.     End Sub
  588.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  589.         MyBase.OnMouseLeave(e)
  590.         _State = MouseState.None
  591.         Invalidate()
  592.     End Sub
  593.  
  594. #End Region
  595.  
  596.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  597.         MyBase.OnPaint(e)
  598.         Dim G = e.Graphics
  599.         G.Clear(Color.FromArgb(211, 222, 228))
  600.  
  601.         G.FillRectangle(New SolidBrush(Color.FromArgb(78, 148, 235)), New Rectangle(0, 0, 15, 15))
  602.  
  603.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  604.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 14, 1, 1))
  605.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(14, 0, 1, 1))
  606.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(14, 14, 1, 1))
  607.  
  608.         If Checked Then
  609.             G.DrawString("ü", New Font("Wingdings", 9), New SolidBrush(Color.FromArgb(17, 17, 17)), New Point(1, 1))
  610.  
  611.         End If
  612.         G.DrawString(Text, New Font("Segoe UI", 10), New SolidBrush(Color.FromArgb(45, 47, 49)), New Point(18, -1))
  613.     End Sub
  614. End Class
  615.  
  616. <DefaultEvent("CheckedChanged")>
  617. Class WinterCheckBoxBlack
  618.     Inherits Control
  619.  
  620. #Region " Variables "
  621.     Private _State As MouseState = MouseState.None
  622.     Private _Checked As Boolean
  623. #End Region
  624.  
  625. #Region " Properties "
  626.     Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  627.         MyBase.OnTextChanged(e)
  628.         Invalidate()
  629.     End Sub
  630.  
  631.     Property Checked() As Boolean
  632.         Get
  633.             Return _Checked
  634.         End Get
  635.         Set(ByVal value As Boolean)
  636.             _Checked = value
  637.             Invalidate()
  638.         End Set
  639.     End Property
  640.  
  641.     Event CheckedChanged(ByVal sender As Object)
  642.     Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
  643.         _Checked = Not _Checked
  644.         RaiseEvent CheckedChanged(Me)
  645.         MyBase.OnClick(e)
  646.     End Sub
  647.  
  648.     Protected Overrides Sub OnResize(e As EventArgs)
  649.         MyBase.OnResize(e)
  650.         Height = 16
  651.     End Sub
  652.  
  653. #End Region
  654.  
  655. #Region " Mouse States "
  656.  
  657.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  658.         MyBase.OnMouseDown(e)
  659.         _State = MouseState.Down
  660.         Invalidate()
  661.     End Sub
  662.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  663.         MyBase.OnMouseUp(e)
  664.         _State = MouseState.Over
  665.         Invalidate()
  666.     End Sub
  667.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  668.         MyBase.OnMouseEnter(e)
  669.         _State = MouseState.Over
  670.         Invalidate()
  671.     End Sub
  672.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  673.         MyBase.OnMouseLeave(e)
  674.         _State = MouseState.None
  675.         Invalidate()
  676.     End Sub
  677.  
  678. #End Region
  679.  
  680.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  681.         MyBase.OnPaint(e)
  682.         Dim G = e.Graphics
  683.         G.Clear(Color.FromArgb(211, 222, 228))
  684.  
  685.         G.FillRectangle(New SolidBrush(Color.FromArgb(17, 17, 17)), New Rectangle(0, 0, 15, 15))
  686.  
  687.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  688.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 14, 1, 1))
  689.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(14, 0, 1, 1))
  690.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(14, 14, 1, 1))
  691.  
  692.         If Checked Then
  693.             G.DrawString("ü", New Font("Wingdings", 9), Brushes.White, New Point(1, 1))
  694.         End If
  695.         G.DrawString(Text, New Font("Segoe UI", 10), New SolidBrush(Color.FromArgb(45, 47, 49)), New Point(18, -1))
  696.     End Sub
  697. End Class
  698.  
  699. <DefaultEvent("TextChanged")>
  700. Class WinterTextBox
  701.     Inherits Control
  702.  
  703. #Region " Variables "
  704.  
  705.     Private _State As MouseState = MouseState.None
  706.     Private WithEvents TB As Windows.Forms.TextBox
  707.  
  708. #End Region
  709.  
  710. #Region " Properties "
  711.  
  712. #Region " TextBox Properties "
  713.  
  714.     Private _TextAlign As HorizontalAlignment = HorizontalAlignment.Left
  715.     <Category("Options")> _
  716.     Property TextAlign() As HorizontalAlignment
  717.         Get
  718.             Return _TextAlign
  719.         End Get
  720.         Set(ByVal value As HorizontalAlignment)
  721.             _TextAlign = value
  722.             If TB IsNot Nothing Then
  723.                 TB.TextAlign = value
  724.             End If
  725.         End Set
  726.     End Property
  727.     Private _MaxLength As Integer = 32767
  728.     <Category("Options")> _
  729.     Property MaxLength() As Integer
  730.         Get
  731.             Return _MaxLength
  732.         End Get
  733.         Set(ByVal value As Integer)
  734.             _MaxLength = value
  735.             If TB IsNot Nothing Then
  736.                 TB.MaxLength = value
  737.             End If
  738.         End Set
  739.     End Property
  740.     Private _ReadOnly As Boolean
  741.     <Category("Options")> _
  742.     Property [ReadOnly]() As Boolean
  743.         Get
  744.             Return _ReadOnly
  745.         End Get
  746.         Set(ByVal value As Boolean)
  747.             _ReadOnly = value
  748.             If TB IsNot Nothing Then
  749.                 TB.ReadOnly = value
  750.             End If
  751.         End Set
  752.     End Property
  753.     Private _UseSystemPasswordChar As Boolean
  754.     <Category("Options")> _
  755.     Property UseSystemPasswordChar() As Boolean
  756.         Get
  757.             Return _UseSystemPasswordChar
  758.         End Get
  759.         Set(ByVal value As Boolean)
  760.             _UseSystemPasswordChar = value
  761.             If TB IsNot Nothing Then
  762.                 TB.UseSystemPasswordChar = value
  763.             End If
  764.         End Set
  765.     End Property
  766.     Private _Multiline As Boolean
  767.     <Category("Options")> _
  768.     Property Multiline() As Boolean
  769.         Get
  770.             Return _Multiline
  771.         End Get
  772.         Set(ByVal value As Boolean)
  773.             _Multiline = value
  774.             If TB IsNot Nothing Then
  775.                 TB.Multiline = value
  776.  
  777.                 If value Then
  778.                     TB.Height = Height - 11
  779.                 Else
  780.                     Height = TB.Height + 11
  781.                 End If
  782.  
  783.             End If
  784.         End Set
  785.     End Property
  786.     <Category("Options")> _
  787.     Overrides Property Text As String
  788.         Get
  789.             Return MyBase.Text
  790.         End Get
  791.         Set(ByVal value As String)
  792.             MyBase.Text = value
  793.             If TB IsNot Nothing Then
  794.                 TB.Text = value
  795.             End If
  796.         End Set
  797.     End Property
  798.     <Category("Options")> _
  799.     Overrides Property Font As Font
  800.         Get
  801.             Return MyBase.Font
  802.         End Get
  803.         Set(ByVal value As Font)
  804.             MyBase.Font = value
  805.             If TB IsNot Nothing Then
  806.                 TB.Font = value
  807.                 TB.Location = New Point(3, 5)
  808.                 TB.Width = Width - 6
  809.  
  810.                 If Not _Multiline Then
  811.                     Height = TB.Height + 11
  812.                 End If
  813.             End If
  814.         End Set
  815.     End Property
  816.  
  817.     Protected Overrides Sub OnCreateControl()
  818.         MyBase.OnCreateControl()
  819.         If Not Controls.Contains(TB) Then
  820.             Controls.Add(TB)
  821.         End If
  822.     End Sub
  823.     Private Sub OnBaseTextChanged(ByVal s As Object, ByVal e As EventArgs)
  824.         Text = TB.Text
  825.     End Sub
  826.     Private Sub OnBaseKeyDown(ByVal s As Object, ByVal e As KeyEventArgs)
  827.         If e.Control AndAlso e.KeyCode = Keys.A Then
  828.             TB.SelectAll()
  829.             e.SuppressKeyPress = True
  830.         End If
  831.         If e.Control AndAlso e.KeyCode = Keys.C Then
  832.             TB.Copy()
  833.             e.SuppressKeyPress = True
  834.         End If
  835.     End Sub
  836.     Protected Overrides Sub OnResize(ByVal e As EventArgs)
  837.         TB.Location = New Point(5, 5)
  838.         TB.Width = Width - 10
  839.  
  840.         If _Multiline Then
  841.             TB.Height = Height - 11
  842.         Else
  843.             Height = TB.Height + 11
  844.         End If
  845.  
  846.         MyBase.OnResize(e)
  847.     End Sub
  848.  
  849. #End Region
  850.  
  851. #Region " Mouse States "
  852.  
  853.     Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
  854.         MyBase.OnMouseDown(e)
  855.         _State = MouseState.Down
  856.         Invalidate()
  857.     End Sub
  858.     Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
  859.         MyBase.OnMouseUp(e)
  860.         _State = MouseState.Over
  861.         TB.Focus()
  862.         Invalidate()
  863.     End Sub
  864.     Protected Overrides Sub OnMouseEnter(e As EventArgs)
  865.         MyBase.OnMouseEnter(e)
  866.         _State = MouseState.Over
  867.         TB.Focus()
  868.         Invalidate()
  869.     End Sub
  870.     Protected Overrides Sub OnMouseLeave(e As EventArgs)
  871.         MyBase.OnMouseLeave(e)
  872.         _State = MouseState.None
  873.         Invalidate()
  874.     End Sub
  875.  
  876. #End Region
  877.  
  878. #End Region
  879.  
  880.     Sub New()
  881.         SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or _
  882.                  ControlStyles.ResizeRedraw Or ControlStyles.OptimizedDoubleBuffer Or _
  883.                  ControlStyles.SupportsTransparentBackColor, True)
  884.         DoubleBuffered = True
  885.  
  886.         BackColor = Color.Transparent
  887.  
  888.         TB = New Windows.Forms.TextBox
  889.         TB.Font = New Font("Segoe UI", 10)
  890.         TB.Text = Text
  891.         TB.BackColor = Color.FromArgb(37, 38, 39)
  892.         TB.ForeColor = Color.White
  893.         TB.MaxLength = _MaxLength
  894.         TB.Multiline = _Multiline
  895.         TB.ReadOnly = _ReadOnly
  896.         TB.UseSystemPasswordChar = _UseSystemPasswordChar
  897.         TB.BorderStyle = BorderStyle.None
  898.         TB.Location = New Point(5, 5)
  899.         TB.Width = Width - 10
  900.  
  901.         TB.Cursor = Cursors.IBeam
  902.  
  903.         If _Multiline Then
  904.             TB.Height = Height - 11
  905.         Else
  906.             Height = TB.Height + 11
  907.         End If
  908.  
  909.         AddHandler TB.TextChanged, AddressOf OnBaseTextChanged
  910.         AddHandler TB.KeyDown, AddressOf OnBaseKeyDown
  911.     End Sub
  912.  
  913.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  914.         MyBase.OnPaint(e)
  915.         Dim G = e.Graphics
  916.         G.Clear(Color.FromArgb(37, 38, 39))
  917.  
  918.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  919.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 1, 1, 1))
  920.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, 0, 1, 1))
  921.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 0, 1, 1))
  922.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 1, 1, 1))
  923.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, 0, 1, 1))
  924.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 1, 1, 1))
  925.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 2, 1, 1))
  926.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, Height - 1, 1, 1))
  927.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 1, 1, 1))
  928.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 2, 1, 1))
  929.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, Height - 1, 1, 1))
  930.  
  931.     End Sub
  932.  
  933. End Class
  934.  
  935. Class WinterProgressBarBlue
  936.     Inherits Control
  937.  
  938. #Region " Variables "
  939.  
  940.     Private _Value As Integer = 0
  941.     Private _Maximum As Integer = 100
  942.  
  943. #End Region
  944. ' Get more free themes at ThemesVB.NET
  945. #Region " Control "
  946.     <Category("Control")>
  947.     Public Property Maximum() As Integer
  948.         Get
  949.             Return _Maximum
  950.         End Get
  951.         Set(V As Integer)
  952.             Select Case V
  953.                 Case Is < _Value
  954.                     _Value = V
  955.             End Select
  956.             _Maximum = V
  957.             Invalidate()
  958.         End Set
  959.     End Property
  960.  
  961.     <Category("Control")>
  962.     Public Property Value() As Integer
  963.         Get
  964.             Select Case _Value
  965.                 Case 0
  966.                     Return 0
  967.                     Invalidate()
  968.                 Case Else
  969.                     Return _Value
  970.                     Invalidate()
  971.             End Select
  972.         End Get
  973.         Set(V As Integer)
  974.             Select Case V
  975.                 Case Is > _Maximum
  976.                     V = _Maximum
  977.                     Invalidate()
  978.             End Select
  979.             _Value = V
  980.             Invalidate()
  981.         End Set
  982.     End Property
  983. #End Region
  984.  
  985. #Region " Events "
  986.     Protected Overrides Sub OnResize(e As EventArgs)
  987.         MyBase.OnResize(e)
  988.         Height = 25
  989.     End Sub
  990.  
  991.     Protected Overrides Sub CreateHandle()
  992.         MyBase.CreateHandle()
  993.         Height = 25
  994.     End Sub
  995.  
  996.     Public Sub Increment(ByVal Amount As Integer)
  997.         Value += Amount
  998.     End Sub
  999. #End Region
  1000.  
  1001.     Sub New()
  1002.         SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or _
  1003.                  ControlStyles.ResizeRedraw Or ControlStyles.OptimizedDoubleBuffer, True)
  1004.         DoubleBuffered = True
  1005.     End Sub
  1006.  
  1007.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  1008.         MyBase.OnPaint(e)
  1009.         Dim G = e.Graphics
  1010.  
  1011.         G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit
  1012.         G.SmoothingMode = SmoothingMode.HighQuality
  1013.         G.PixelOffsetMode = PixelOffsetMode.HighQuality
  1014.  
  1015.         G.Clear(Color.FromArgb(40, 40, 40))
  1016.  
  1017.         Dim ProgVal As Integer = CInt(_Value / _Maximum * Width)
  1018.  
  1019.         G.FillRectangle(New SolidBrush(Color.FromArgb(61, 132, 221)), New Rectangle(0, 0, ProgVal - 1, Height))
  1020.         G.FillRectangle(New SolidBrush(Color.FromArgb(78, 148, 235)), New Rectangle(0, 0, ProgVal - 1, Height / 2))
  1021.  
  1022.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  1023.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 1, 1, 1))
  1024.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, 0, 1, 1))
  1025.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 0, 1, 1))
  1026.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 1, 1, 1))
  1027.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, 0, 1, 1))
  1028.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 1, 1, 1))
  1029.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 2, 1, 1))
  1030.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, Height - 1, 1, 1))
  1031.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 1, 1, 1))
  1032.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 2, 1, 1))
  1033.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, Height - 1, 1, 1))
  1034.  
  1035.         G.InterpolationMode = CType(7, InterpolationMode)
  1036.     End Sub
  1037. End Class
  1038.  
  1039. Class WinterProgressBarBlack
  1040.     Inherits Control
  1041.  
  1042. #Region " Variables "
  1043.  
  1044.     Private _Value As Integer = 0
  1045.     Private _Maximum As Integer = 100
  1046.  
  1047. #End Region
  1048. ' Get more free themes at ThemesVB.NET
  1049. #Region " Control "
  1050.     <Category("Control")>
  1051.     Public Property Maximum() As Integer
  1052.         Get
  1053.             Return _Maximum
  1054.         End Get
  1055.         Set(V As Integer)
  1056.             Select Case V
  1057.                 Case Is < _Value
  1058.                     _Value = V
  1059.             End Select
  1060.             _Maximum = V
  1061.             Invalidate()
  1062.         End Set
  1063.     End Property
  1064.  
  1065.     <Category("Control")>
  1066.     Public Property Value() As Integer
  1067.         Get
  1068.             Select Case _Value
  1069.                 Case 0
  1070.                     Return 0
  1071.                     Invalidate()
  1072.                 Case Else
  1073.                     Return _Value
  1074.                     Invalidate()
  1075.             End Select
  1076.         End Get
  1077.         Set(V As Integer)
  1078.             Select Case V
  1079.                 Case Is > _Maximum
  1080.                     V = _Maximum
  1081.                     Invalidate()
  1082.             End Select
  1083.             _Value = V
  1084.             Invalidate()
  1085.         End Set
  1086.     End Property
  1087. #End Region
  1088.  
  1089. #Region " Events "
  1090.     Protected Overrides Sub OnResize(e As EventArgs)
  1091.         MyBase.OnResize(e)
  1092.         Height = 25
  1093.     End Sub
  1094.  
  1095.     Protected Overrides Sub CreateHandle()
  1096.         MyBase.CreateHandle()
  1097.         Height = 25
  1098.     End Sub
  1099.  
  1100.     Public Sub Increment(ByVal Amount As Integer)
  1101.         Value += Amount
  1102.     End Sub
  1103. #End Region
  1104. ' Get more free themes at ThemesVB.NET
  1105.     Sub New()
  1106.         SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or _
  1107.                  ControlStyles.ResizeRedraw Or ControlStyles.OptimizedDoubleBuffer, True)
  1108.         DoubleBuffered = True
  1109.     End Sub
  1110.  
  1111.     Protected Overrides Sub OnPaint(e As PaintEventArgs)
  1112.         MyBase.OnPaint(e)
  1113.         Dim G = e.Graphics
  1114.  
  1115.         G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit
  1116.         G.SmoothingMode = SmoothingMode.HighQuality
  1117.         G.PixelOffsetMode = PixelOffsetMode.HighQuality
  1118.  
  1119.         G.Clear(Color.FromArgb(180, 194, 212))
  1120.  
  1121.         Dim ProgVal As Integer = CInt(_Value / _Maximum * Width)
  1122.  
  1123.         G.FillRectangle(New SolidBrush(Color.FromArgb(17, 17, 17)), New Rectangle(0, 0, ProgVal - 1, Height))
  1124.         G.FillRectangle(New SolidBrush(Color.FromArgb(67, 68, 69)), New Rectangle(0, 0, ProgVal - 1, Height / 2))
  1125.  
  1126.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 0, 1, 1))
  1127.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, 1, 1, 1))
  1128.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, 0, 1, 1))
  1129.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 0, 1, 1))
  1130.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, 1, 1, 1))
  1131.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, 0, 1, 1))
  1132.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 1, 1, 1))
  1133.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(0, Height - 2, 1, 1))
  1134.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(1, Height - 1, 1, 1))
  1135.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 1, 1, 1))
  1136.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 1, Height - 2, 1, 1))
  1137.         G.FillRectangle(New SolidBrush(Color.FromArgb(211, 222, 228)), New Rectangle(Width - 2, Height - 1, 1, 1))
  1138.  
  1139.         G.InterpolationMode = CType(7, InterpolationMode)
  1140.     End Sub
  1141. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement