daily pastebin goal
44%
SHARE
TWEET

Advantium VB.Net Theme by ZerO

xZ3ROxPROJ3CTx Sep 4th, 2011 6,737 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Drawing.Drawing2D
  2.  
  3. 'Theme
  4. Class AdvantiumTheme
  5.     Inherits ThemeContainer151
  6.  
  7.     Sub New()
  8.         TransparencyKey = Color.Fuchsia
  9.         MoveHeight = 35
  10.  
  11.         SetColor("BackColor", Color.FromArgb(40, 40, 40))
  12.         SetColor("BorderInner", Color.FromArgb(65, 65, 65))
  13.         SetColor("BorderColor", Color.Black)
  14.         SetColor("TextColor", Color.LawnGreen)
  15.     End Sub
  16.  
  17.  
  18.     Dim C1, BC, BA, T1 As Color
  19.     Protected Overrides Sub ColorHook()
  20.         C1 = GetColor("BackColor")
  21.         BC = GetColor("BorderColor")
  22.         BA = GetColor("BorderInner")
  23.         T1 = GetColor("TextColor")
  24.     End Sub
  25.  
  26.  
  27.     Protected Overrides Sub PaintHook()
  28.         G.Clear(C1)
  29.         DrawGradient(Color.FromArgb(20, 20, 20), Color.FromArgb(40, 40, 40), New Rectangle(0, 0, Width, 35), 90S)
  30.  
  31.         Dim T As New HatchBrush(HatchStyle.Percent10, Color.FromArgb(25, 25, 25), Color.FromArgb(35, 35, 35))
  32.         G.FillRectangle(T, New Rectangle(11, 25, Width - 23, Height - 36))
  33.  
  34.         G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(22, 22, 22))), New Rectangle(11, 25, Width - 23, Height - 36))
  35.         G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(40, 40, 40))), New Rectangle(12, 26, Width - 25, Height - 38))
  36.         DrawCorners(Color.FromArgb(40, 40, 40), New Rectangle(11, 25, Width - 22, Height - 35))
  37.  
  38.         DrawBorders(New Pen(New SolidBrush(BA)), 1)
  39.         DrawBorders(New Pen(New SolidBrush(BC)))
  40.         DrawCorners(TransparencyKey)
  41.         DrawText(New SolidBrush(T1), HorizontalAlignment.Left, 15, -3)
  42.     End Sub
  43. End Class
  44.  
  45. 'Button
  46. Class AdvantiumButton
  47.     Inherits ThemeControl151
  48.  
  49.     Sub New()
  50.         SetColor("BackColor", Color.FromArgb(40, 40, 40))
  51.         SetColor("TextColor", Color.LawnGreen)
  52.     End Sub
  53.  
  54.  
  55.     Dim C1, T1 As Color
  56.     Protected Overrides Sub ColorHook()
  57.         C1 = GetColor("BackColor")
  58.         T1 = GetColor("TextColor")
  59.     End Sub
  60.  
  61.  
  62.     Protected Overrides Sub PaintHook()
  63.         G.Clear(C1)
  64.         Select Case State
  65.             Case 0 'None
  66.                 DrawGradient(Color.FromArgb(50, 50, 50), Color.FromArgb(42, 42, 42), ClientRectangle, 90S)
  67.                 Cursor = Cursors.Arrow
  68.             Case 1 'Down
  69.                 DrawGradient(Color.FromArgb(50, 50, 50), Color.FromArgb(42, 42, 42), ClientRectangle, 90S)
  70.                 Cursor = Cursors.Hand
  71.             Case 2 'Over
  72.                 DrawGradient(Color.FromArgb(42, 42, 42), Color.FromArgb(50, 50, 50), ClientRectangle, 90S)
  73.                 Cursor = Cursors.Hand
  74.         End Select
  75.         DrawBorders(New Pen(New SolidBrush(Color.FromArgb(59, 59, 59))), 1)
  76.         DrawBorders(New Pen(New SolidBrush(Color.FromArgb(25, 25, 25))))
  77.         DrawCorners(Color.FromArgb(35, 35, 35))
  78.         DrawText(New SolidBrush(T1), HorizontalAlignment.Center, 0, 0)
  79.     End Sub
  80. End Class
  81.  
  82. 'Top Button
  83. Class AdvantiumTopButton
  84.     Inherits ThemeControl151
  85.  
  86.     Sub New()
  87.         SetColor("BackColor", Color.FromArgb(40, 40, 40))
  88.         SetColor("TextColor", Color.LawnGreen)
  89.         Size = New Size(28, 26)
  90.     End Sub
  91.  
  92.  
  93.     Dim C1, T1 As Color
  94.     Protected Overrides Sub ColorHook()
  95.         C1 = GetColor("BackColor")
  96.         T1 = GetColor("TextColor")
  97.     End Sub
  98.  
  99.  
  100.     Protected Overrides Sub PaintHook()
  101.         G.Clear(C1)
  102.         Select Case State
  103.             Case 0 'None
  104.                 DrawGradient(Color.FromArgb(38, 38, 38), Color.FromArgb(30, 30, 30), ClientRectangle, 90S)
  105.                 Cursor = Cursors.Arrow
  106.             Case 1 'Down
  107.                 DrawGradient(Color.FromArgb(50, 50, 50), Color.FromArgb(42, 42, 42), ClientRectangle, 90S)
  108.                 Cursor = Cursors.Hand
  109.             Case 2 'Over
  110.                 DrawGradient(Color.FromArgb(42, 42, 42), Color.FromArgb(50, 50, 50), ClientRectangle, 90S)
  111.                 Cursor = Cursors.Hand
  112.         End Select
  113.         DrawBorders(New Pen(New SolidBrush(Color.FromArgb(65, 65, 65))), New Rectangle(1, 0, Width - 2, Height))
  114.         DrawBorders(New Pen(New SolidBrush(Color.FromArgb(22, 22, 22))))
  115.         G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(22, 22, 22))), 2, Height - 1, Width - 3, Height - 1)
  116.         G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(65, 65, 65))), 0, 1, Width - 1, 1)
  117.         G.DrawLine(New Pen(New SolidBrush(Color.Black)), 0, 0, Width, 0)
  118.     End Sub
  119. End Class
  120.  
  121. 'CheckBox
  122. Class AdvantiumCheck
  123.     Inherits ThemeControl151
  124.     Private _CheckedState As Boolean
  125.     Public Property CheckedState() As Boolean
  126.         Get
  127.             Return _CheckedState
  128.         End Get
  129.         Set(ByVal v As Boolean)
  130.             _CheckedState = v
  131.             Invalidate()
  132.         End Set
  133.     End Property
  134.     Sub New()
  135.         Size = New Size(100, 15)
  136.         MinimumSize = New Size(16, 16)
  137.         MaximumSize = New Size(600, 16)
  138.         CheckedState = False
  139.         SetColor("CheckBorderOut", Color.FromArgb(25, 25, 25))
  140.         SetColor("CheckBorderIn", Color.FromArgb(59, 59, 59))
  141.         SetColor("TextColor", Color.LawnGreen)
  142.         SetColor("CheckBack1", Color.FromArgb(132, 192, 240))
  143.         SetColor("CheckBack2", Color.LawnGreen)
  144.         SetColor("CheckFore1", Color.LawnGreen)
  145.         SetColor("CheckFore2", Color.FromArgb(42, 242, 77))
  146.         SetColor("ColorUncheck", Color.FromArgb(35, 35, 35))
  147.         SetColor("BackColor", Color.FromArgb(35, 35, 35))
  148.     End Sub
  149.     Dim C1, C2, C3, C4, C5, C6, P1, P2, B1 As Color
  150.     Protected Overrides Sub ColorHook()
  151.         C1 = GetColor("CheckBack1")
  152.         C2 = GetColor("CheckBack2")
  153.         C3 = GetColor("CheckFore1")
  154.         C4 = GetColor("CheckFore2")
  155.         C5 = GetColor("ColorUncheck")
  156.         C6 = GetColor("BackColor")
  157.         P1 = GetColor("CheckBorderOut")
  158.         P2 = GetColor("CheckBorderIn")
  159.         B1 = GetColor("TextColor")
  160.     End Sub
  161.     Protected Overrides Sub PaintHook()
  162.         G.Clear(C6)
  163.         Select Case CheckedState
  164.             Case True
  165.                 DrawGradient(C1, C2, 3, 3, 9, 9, 90S)
  166.                 DrawGradient(C3, C4, 4, 4, 7, 7, 90S)
  167.             Case False
  168.                 DrawGradient(C5, C5, 0, 0, 15, 15, 90S)
  169.         End Select
  170.         G.DrawRectangle(New Pen(New SolidBrush(P1)), 0, 0, 14, 14)
  171.         G.DrawRectangle(New Pen(New SolidBrush(P2)), 1, 1, 12, 12)
  172.         DrawText(New SolidBrush(B1), 17, 0)
  173.         DrawCorners(C6, New Rectangle(0, 0, 13, 13))
  174.     End Sub
  175.     Sub changeCheck() Handles Me.Click
  176.         Select Case CheckedState
  177.             Case True
  178.                 CheckedState = False
  179.             Case False
  180.                 CheckedState = True
  181.         End Select
  182.     End Sub
  183. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top