SHARE
TWEET

[Theme] Skype Theme

Temploit Nov 2nd, 2012 1,079 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Region "Skype Theme"
  2. Class SkypeButton
  3.     Inherits ThemeControl154
  4.     Public Function RoundUp(ByVal d As Double) As Integer
  5.         If d.ToString.Contains(",") Then
  6.             Return CInt(d.ToString.Split(",")(0)) + 1
  7.         Else
  8.             Return CInt(d)
  9.         End If
  10.     End Function
  11.     Private Function CodeToImage(ByVal Code As String) As Image
  12.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  13.     End Function
  14.     Dim Side_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAgCAIAAAC6rk4JAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAANVJREFUKFNVx81LwgAAhvG3PzqKltmnmnrw0tVD05xpERTkqUMEdQgKOr2VOvOj/GIjcOg8WFu94H6n51kpPi78qfftDOfzGfJ3k+w5y7ftvjtF7tL+Ld/3XddF5oy98WQUQrpKx3GGIRxW+VfBpCocSDB9QbLCL0HiNDqfgoMyexKdfYtdwZ7FjmDXYluis2PxQ7BdYkuCsQXxk+g0BVtFNgSx5dkssC4wCnyXYN4EhslXwYbJh+f/w2r+5eiqzhBSNW/dZO6C909E9maRvPaMkr12zB/HeDzVgnCjBwAAAABJRU5ErkJggg==")
  15.     Dim Side_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAgCAIAAAC6rk4JAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAANVJREFUKFNdyT1PwgAQxvFjQIyDiQMflZBYFXkRUIlxce0AKO9dMMHJgZA4OrBwKlLEAoUm7QAN6YLXJk+C/JbL/7lQQeNwOHJ8Ej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jin8iwl4+G0MD8+CvuAi3ClBnyDjA1zJs3ByjEDGEBwcA5DRB0cC0e507Rw93XupZY2Vibd0oWGLi1h1TXzcmWa0sk7WjydC2yozBDZ0HwAAAABJRU5ErkJggg==")
  18.     Dim Side_Left_Click As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAgCAIAAAC6rk4JAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAXtJREFUKFM90esvQmEcwPGf9/4O1iaq07nk9NLmvyFSnXJKF5dcy/2Su3ljXrhf4o2NjWHT6foYW4pTmAjltuE52rz8vP1+i+ZPfj7f88Xf91+fHzC1n5vfQQ6fn+XWYWEvbvf5S3S7pfo9mPMjrXlbxh3JnecSZMZDuetS6clKKOMFhVtU977BrB/JbTGl+1bCzD+8eZjeRuW2mMp9S2JMYVijqrY06cnB5BYq56Oq1jTZ84cKPkK0pKjuV5jYRBWNEaI5RXX9QWEJq10i3fkC4xtIYQ6rnSLd8QI+DC4kof0ZxtaR0hQiHSLjLsAYIu0i0/YMo2tIZQhSTTea1iyMYDQEKduNpiULwxh6gbJea5qfJBB6geavK10F1At0Y7LS+QhDq4ioExhLknU8wiCGLsCYE6w9AwMriKgNMFyCbcpA/wpS15wxpiut7QH6lguIs/ydhCrulDZcaLgkdC8GjcMHtP4cWwrfu4RMo8fV1ijgJdgDG3HvEvoFGSnkfAH6/cgAAAAASUVORK5CYII=")
  19.     Dim Side_Right_Click As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAgCAIAAAC6rk4JAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAXtJREFUKFNjXLbnJisb+xcmUTYOLgbriq0Ns3Yu3X1z/pGvDOrFB9UK9tTP2rXq4AMG3aZbmhUnbSp3Lt51k8Gw/6Nu813NshMgjsnE7wYdz3RqLkE5hh0vdetuLALJTPgG4SwEckz7vxm1v9SrvbFgJ5DT99Wo7YVezfX5QI5Z31fjthf6Ndfn7QByer8Ytz7Xr7kG5vR8MW55rl99be72mwzm3Z9Nmp8ZVF0Fc7o+mzQ9M6i8OmcbkNP5CcSpuDIbyLHo+GTa+Myw/MqsrUBO+0fThqeGZZdBHMu2j2b1T41KL8/cAuS0fjSre2pUcnkGiNPywaz2iVHxpelAjlXzB/OaJ8ZQTtN78+rHxkVgGevG9xZVj40LL03bDOQ0vLOofGRccHEqiFP/zqLikXH+xSmbbjLY1L21KH9okndhMpBjXfPKovwBkDNpI9CeisfmpXdcys+COECWefGtsulHe9dcZnCvvV4+8xQ04CdsuDll2wNgFCw98x8ArkjdwxRv+JQAAAAASUVORK5CYII=")
  20.     Dim ClickBG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAD8AAAAgCAIAAAAqvTfGAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAL1JREFUWEfVzikOwlAARdHHYkiQCNr+tp8toUjqSJhn6AAsAY1EsAGW0KDQBEXngSAxJNi+m7OAWztefPBW75x5oWFdeaG5evBC6/DmBWVf8oKyK3lB8QpeUL3iyy1UKlDd/DcnVysPfxc1J68saHbGC9o24wWxSXlBrFNeEKuEF/Rlwgv6IuYFYx7zgjGLecGYRrxgTiJeMMchL8hRyAtyGPCCHAS80O6/eJHfy96TF4R15wWte+MF++Tz+gAX4QMt3+M70AAAAABJRU5ErkJggg==")
  21.     Sub New()
  22.         LockHeight = 32
  23.     End Sub
  24.     Private _Text_Margin_Left As Integer = 0
  25.     Property Text_Margin_Left() As Integer
  26.         Get
  27.             Return _Text_Margin_Left
  28.         End Get
  29.         Set(ByVal value As Integer)
  30.             _Text_Margin_Left = value
  31.             Invalidate()
  32.         End Set
  33.     End Property
  34.     Private _Image As Image = Nothing
  35.     Property Image() As Image
  36.         Get
  37.             Return _Image
  38.         End Get
  39.         Set(ByVal value As Image)
  40.             _Image = value
  41.             Invalidate()
  42.         End Set
  43.     End Property
  44.     Protected Overrides Sub ColorHook()
  45.     End Sub
  46.     Public Enum AllignMode
  47.         Left = 1
  48.         Right = 2
  49.     End Enum
  50.     Private _AllignModes As AllignMode = AllignMode.Left
  51.     Property ImageAllignmentMode() As AllignMode
  52.  
  53.         Get
  54.             Return _AllignModes
  55.         End Get
  56.         Set(ByVal value As AllignMode)
  57.             _AllignModes = value
  58.             Invalidate()
  59.         End Set
  60.     End Property
  61.     Protected Overrides Sub PaintHook()
  62.         G.Clear(Color.Fuchsia)
  63.         G.SmoothingMode = SmoothingMode.HighSpeed
  64.  
  65.         If State = MouseState.Down Then
  66.             For i = 0 To RoundUp(Width / 63)
  67.                 G.DrawImage(ClickBG, i * 63, 0)
  68.             Next
  69.             G.DrawImage(Side_Left_Click, 0, 0, 4, 32)
  70.             G.DrawImage(Side_Right_Click, Width - 4, 0, 4, 32)
  71.             G.DrawString(Text, New Font("Arial", 10, FontStyle.Bold), Brushes.White, 5 + _Text_Margin_Left, 8)
  72.         ElseIf State = MouseState.None Then
  73.             DrawGradient(Color.FromArgb(140, 174, 217), Color.FromArgb(119, 162, 217), ClientRectangle)
  74.             DrawGradient(Color.FromArgb(237, 237, 237), Color.FromArgb(217, 217, 217), New Rectangle(1, 2, Width - 2, Height - 3))
  75.             G.DrawLine(Pens.White, 1, 1, Width, 1)
  76.             G.DrawImage(Side_Left, 0, 0, 4, 32)
  77.             G.DrawImage(Side_Right, Width - 4, 0, 4, 32)
  78.             G.DrawString(Text, New Font("Arial", 10, FontStyle.Bold), New SolidBrush(Color.FromArgb(51, 51, 51)), 5 + _Text_Margin_Left, 8)
  79.         ElseIf State = MouseState.Over Then
  80.             DrawGradient(Color.FromArgb(119, 148, 185), Color.FromArgb(101, 138, 185), ClientRectangle)
  81.             DrawGradient(Color.FromArgb(237, 237, 237), Color.FromArgb(217, 217, 217), New Rectangle(1, 2, Width - 2, Height - 3))
  82.             G.DrawLine(Pens.White, 1, 1, Width, 1)
  83.             G.DrawImage(Side_Left_Hover, 0, 0, 4, 32)
  84.             G.DrawImage(Side_Right_Hover, Width - 4, 0, 4, 32)
  85.             G.DrawString(Text, New Font("Arial", 10, FontStyle.Bold), New SolidBrush(Color.FromArgb(51, 51, 51)), 5 + _Text_Margin_Left, 8)
  86.         End If
  87.         Try
  88.             If _AllignModes = AllignMode.Left Then
  89.                 G.DrawImage(_Image, 8, 8, 16, 16)
  90.             Else
  91.                 G.DrawImage(_Image, Width - 24, 8, 16, 16)
  92.             End If
  93.         Catch ex As Exception
  94.  
  95.         End Try
  96.     End Sub
  97. End Class
  98. Class SkypeAdvertisement
  99.     Inherits ThemeControl154
  100.     Private Function CodeToImage(ByVal Code As String) As Image
  101.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  102.     End Function
  103.     Dim CornerImg1 As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAB9JREFUGFdj7Nn3X4iLQVGYgWHeif/H7oMQw/7bUBYA31ESKR4EWfAAAAAASUVORK5CYII=")
  104.     Dim CornerImg2 As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAB9JREFUGFdj3H/7//23DO++MTAcu/8fiOad+A9lAWUAOvkV2aJ25r4AAAAASUVORK5CYII=")
  105.     Public Function FlipImage(ByVal img As Bitmap) As Bitmap
  106.         Dim NewBMP As New Bitmap(img)
  107.         For x = 0 To img.Width - 1
  108.             For y = 0 To img.Height - 1
  109.                 Dim NewX As Integer = img.Width - x - 1
  110.                 Dim NewY As Integer = img.Height - y - 1
  111.                 NewBMP.SetPixel(NewX, NewY, img.GetPixel(x, y))
  112.             Next
  113.         Next
  114.         Return NewBMP
  115.     End Function
  116.     Sub New()
  117.     End Sub
  118.     Private _Image As Image = Nothing
  119.     Property Image() As Image
  120.         Get
  121.             Return _Image
  122.         End Get
  123.         Set(ByVal value As Image)
  124.             _Image = value
  125.             Invalidate()
  126.         End Set
  127.     End Property
  128.     Protected Overrides Sub ColorHook()
  129.     End Sub
  130.  
  131.     Protected Overrides Sub PaintHook()
  132.         G.Clear(Color.FromArgb(198, 223, 255))
  133.         G.DrawImage(CornerImg1, 0, 0)
  134.         G.DrawImage(CornerImg2, Width - 3, 0)
  135.         G.DrawImage(FlipImage(CornerImg2), 0, Height - 3)
  136.         G.DrawImage(FlipImage(CornerImg1), Width - 3, Height - 3)
  137.         Try
  138.             G.DrawImage(_Image, 5, 5, Width - 10, Height - 10)
  139.         Catch ex As Exception
  140.  
  141.         End Try
  142.     End Sub
  143. End Class
  144. Class SkypeButton2
  145.     Inherits ThemeControl154
  146.     Protected Sub DrawTextNew(ByVal b1 As Brush, ByVal text As String) ''Made by Aeonhack. Edited by me so it fits in the theme.
  147.         If text.Length = 0 Then Return
  148.  
  149.         Dim DrawTextSize As Size = Measure(text)
  150.         Dim DrawTextPoint As Point = New Point(Width \ 2 - DrawTextSize.Width \ 2, Height \ 2 - DrawTextSize.Height \ 2)
  151.  
  152.  
  153.         G.DrawString(text, New Font("Arial", 10, FontStyle.Bold), b1, DrawTextPoint.X, DrawTextPoint.Y)
  154.  
  155.     End Sub
  156.     Public Function RoundUp(ByVal d As Double) As Integer
  157.         If d.ToString.Contains(",") Then
  158.             Return CInt(d.ToString.Split(",")(0)) + 1
  159.         Else
  160.             Return CInt(d)
  161.         End If
  162.     End Function
  163.     Private Function CodeToImage(ByVal Code As String) As Image
  164.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  165.     End Function
  166.     Sub New()
  167.         LockHeight = 25
  168.         Font = New Font("Arial", 10, FontStyle.Bold)
  169.     End Sub
  170.     Protected Overrides Sub ColorHook()
  171.     End Sub
  172.     Public Enum ImgState
  173.         Text = 1
  174.         Image = 2
  175.     End Enum
  176.     Private _ImgState As ImgState = ImgState.Text
  177.     Property ImageState() As ImgState
  178.         Get
  179.             Return _ImgState
  180.         End Get
  181.         Set(ByVal value As ImgState)
  182.             _ImgState = value
  183.             Invalidate()
  184.         End Set
  185.     End Property
  186.     Protected Overrides Sub PaintHook()
  187.         Dim Normal_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAASpJREFUOE99kz1vglAYhW///87kRBgIEcKALCwSB1gkfARDQpAmaEVtaWkLJTSBHoqJoFyf9T68ufecl6e2bckddV1//FOWJYExpKqq7XZr23aWZfCaphkZp9OpP/sdcDWOxyOOi6L4GXMx0jS1LOt7is7AN4Zh5Hn+NUVneJ632+0+KRC8Z7lcYgANEkVRHMePjNVqhUf2+UxCFosFAninQ2RZhvEAIknS20M643w+v9IhiqIgDEg0iGmavu/jOTTIfr+fz+eojQbBEqiqutlsUN4kXS9YGZ7nkyR5maIzMAbJiqII6Z7LfqAXXdcFQcC85zHXHYOEklmWXa/XQ2e0p5Bc10WGs9kMKQRBgNpvdx13OhwOjuNomsZxHMMwt0b/Z8BDl7h1GIZ/ySbf47asV7IAAAAASUVORK5CYII=")
  188.         Dim Normal_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAS9JREFUOE99kj1vglAUhk8XBqb+eicm40CIEAZhcYEw4KKIBmJCgCZA+WptbSslNsGeWxoDgeuz3JDzcD/Oex4sy2JZ9vEPhmFgSNM0l8vleDxut9sgCOq6vvaBnw6tVxRF14HvPufzGaU8z28SfI2x2WyyLGsl+BzjdDqZpom7E+ODQhzH+/2eGKjT0DStqqp7RhiGvu/DOx18tmEY8EYH26MoCuByB1mW4fUukiTBC52yLImBCw1syWKxALwwDcdxVqsVYEg05vN5kiSACY3iuq6qqjg68DxGFEU8z+NAkVzwY4goithN3IAYT33wP0EQdF3HOP/noyus1+vpdIqR3spkDwzwcDjgqziOw/7sdrtumRiTyWQ2my2XS9u20zRtz+5Nsud5eFMMb1hrvV/5S9RzkFpijAAAAABJRU5ErkJggg==")
  189.         Dim Normal_BG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADYAAAAZCAIAAAD13UppAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIpJREFUWEfl0T0KwkAUReETZv9NClc1GxCLCIJEY340goVM9DnltHnCFb8FHC7cKsbIaiEEa6SUVpfKwKf88rBkHqWyYVme8njI4y6PWR43eVzl/cLESR6jPAZ59PK4yKOTx1keJ3m08jjK4yCPvby/mdhk3/jDstQeNplHqWxYlq2HXeZRKhuWfQNxD9FuOCD9GwAAAABJRU5ErkJggg==")
  190.  
  191.         Dim Hover_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAS9JREFUOE99kzuLg1AQRu/+/97GSrAQBLEwNjYRES0kqCnFNBp8Iivrxse6uJ9rdpP4OuWd4525M+PbMAxkQdd177/cbjcC45mmaS6Xi23baZoi3Pf9i4FTxLIsQ+D7j4eRJMnpdJq+e+ZuxHFsWVbbtl8LRqOua8MwqqpCgUtG43w+h2G4GsYhQeLj8YgnIMUqxPd9PG8rjHOiaVqe53vG4XBAjXuGKIo74TGLIAgodofRmCa0BZEkCc343IaYpuk4zp5xvV55ni/LEi9ahaCvsiyj8ZsG5oKechyH8X6sMU4O16CzyFUUBdLNuO8HTlVVxU0oa9rQfx47BglDZhgGq4RJrRhIB8l1XfSQpmld1z3PQ3HzXUdNURShQ4qisCxLUdTcmP4MeKg6CAJc8wOLkfGPTRlxyQAAAABJRU5ErkJggg==")
  192.         Dim Hover_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAATFJREFUOE99kjuLg0AURmcbu8D+dlsrwUIQxMKkSaOEYAoJPioRbaL4CkHZrEl2XdzPTSJm1Tnl3DN37mPeTNNcLBbvfzAMQ8a0bVvXdZ7nlmWFYXi9XnEyhPw8aZqmKAp4sF8MBIYg336/z7Ksl8j3iNvthuLSNL1L5GuK8/lsGMblcpk1cCuKItd1OwM5J0FTmqahrFkD19B8EAQ043g8bjYbmoF6l8slzcBDiqIQ1EJBlmWaUZZlZ3zOg5GoqkozbNve7XYEBU9SVZUkSXEczxoY+Wq1wvjJxxRYrCiKmGm3F2T7x+l0Qn5MEwk6Ay0NwcO4res6rj3+Rx/GFvBxeJ7HSvvwI4fv+9vtluM4zMdxnGG4M1iWFQRhvV6j+yRJ7m+//GTP8w6HA6obx+7eL3XU5i5sD4RGAAAAAElFTkSuQmCC")
  193.         Dim Hover_BG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADYAAAAZCAIAAAD13UppAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIxJREFUWEft0TsKgDAQBNCR3L+x8FS5gHgBS8UoRA1+Yr9uQGEivnoYJpvCWgsdY8wRDCHo4gmpm+ZNbY3U8YSg3HxehRyuFzDDQg8zvRwmenqgX+j/iU/8UQ5XnOiBfuGEkV4OEx090C90GOihp4eO3rcmttEbR5ebUapVkTqeEJSbUas1kTqeEJSbdz1AWt41xKtlAAAAAElFTkSuQmCC")
  194.  
  195.         Dim Click_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAZFJREFUOE+FkymvwlAQRu/7sYgGj0I0ILAIMBVNUYQg2ASQsJMQ9n1fnigCiUTC6RsCpYj3uWbOLHfm68/9fldfOp/Pg8Fgv99fr1cF4ZZt25qmBQIBv9+fTCZrtdoHUSwWg8GgYRjlcrlerzebzXa7/SZKpZKu69lslhiBTqfT6/Xo9SQIh0IhUskj1u/3R6PRdDqdz+cOwVzhcDifz5NK3ng8JrBarTabzXa7dQifz5dIJAiTOplMlsslMR5yOByOx6OiQCQSoTfZlCV1t9sRO51Ov39SjBaNRrvdLtkSJs8tFYvFqtXqcDhcLBZ0lWy3FAUgKLBer+ntCfOp4vE4BMNLAep7a7BBCOaH8Ewgn8o0TSHkCd+QsizrHyKdTr+6UONbih1nMpnZbCZ7lFW6pW63WyqV4lq8llEEcsu5CzVwBiuXU8G55RCUAcJOrBVIBCp6+uNyueRyuVarxUBch44vvT0GVCgUcBDeYT0v7sOnQJitUqkwOBynAPV6nZmARI1GA9RLyJ8Bh7M4OMZ7AMVcm8qafdstAAAAAElFTkSuQmCC")
  196.         Dim Click_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAsAAAAZCAIAAABo0EPhAAAA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LFXD9R32OOunoI1omAvqCpF3DI0g4t6/qvFuEbP8dDlZOzUgzVN/AOk5QVCOfkDog29Jih87R0AAAAASUVORK5CYII=")
  198.  
  199.         G.Clear(Color.Fuchsia)
  200.  
  201.         If State = MouseState.Down Then
  202.             For i = 0 To RoundUp(Width / 54)
  203.                 G.DrawImage(Click_BG, i * 54, 0)
  204.             Next
  205.             G.DrawImage(Click_Left, 0, 0, 11, 25)
  206.             G.DrawImage(Click_Right, Width - 11, 0, 11, 25)
  207.         ElseIf State = MouseState.None Then
  208.             For i = 0 To RoundUp(Width / 54)
  209.                 G.DrawImage(Normal_BG, i * 54, 0)
  210.             Next
  211.             G.DrawImage(Normal_Left, 0, 0, 11, 25)
  212.             G.DrawImage(Normal_Right, Width - 11, 0, 11, 25)
  213.         ElseIf State = MouseState.Over Then
  214.             For i = 0 To RoundUp(Width / 54)
  215.                 G.DrawImage(Hover_BG, i * 54, 0)
  216.             Next
  217.             G.DrawImage(Hover_Left, 0, 0, 11, 25)
  218.             G.DrawImage(Hover_Right, Width - 11, 0, 11, 25)
  219.         End If
  220.  
  221.         If _ImgState = ImageState.Image Then
  222.             Try
  223.                 G.DrawImage(Image, 13, 4, 16, 16)
  224.             Catch ex As Exception
  225.             End Try
  226.         Else
  227.             DrawTextNew(New SolidBrush(Color.FromArgb(51, 51, 51)), Text)
  228.         End If
  229.     End Sub
  230. End Class
  231. Class SkypeCallButton
  232.     Inherits ThemeControl154
  233.     Protected Sub DrawTextNew(ByVal b1 As Brush, ByVal text As String) ''Made by Aeonhack. Edited by me so it fits in the theme.
  234.         If text.Length = 0 Then Return
  235.  
  236.         Dim DrawTextSize As Size = Measure(text)
  237.         Dim DrawTextPoint As Point = New Point(Width \ 2 - DrawTextSize.Width \ 2, Height \ 2 - DrawTextSize.Height \ 2)
  238.  
  239.  
  240.         G.DrawString(text, New Font("Arial", 10, FontStyle.Bold), b1, DrawTextPoint.X, DrawTextPoint.Y)
  241.  
  242.     End Sub
  243.     Public Function RoundUp(ByVal d As Double) As Integer
  244.         If d.ToString.Contains(",") Then
  245.             Return CInt(d.ToString.Split(",")(0)) + 1
  246.         Else
  247.             Return CInt(d)
  248.         End If
  249.     End Function
  250.     Private Function CodeToImage(ByVal Code As String) As Image
  251.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  252.     End Function
  253.     Sub New()
  254.         LockHeight = 25
  255.         Font = New Font("Arial", 10, FontStyle.Bold)
  256.     End Sub
  257.     Protected Overrides Sub ColorHook()
  258.     End Sub
  259.     Protected Overrides Sub PaintHook()
  260.         Dim Normal_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAABYAAAAZCAIAAAC6gEm5AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAmJJREFUOE+VlE9IYlEYxa/9oQINAhGiVkGbCqpdVtIuopZFERFRULSICiOyIty0qKRVEJROViMkYzDPIorsUShm/58yDDKzSXDhKpBaCG3sPD55mZb2Hj/k3vu+c75zr3oV8XicpT2hlxAX4kDgKRB9jaYXfFiBRfLz+Pw4cD5QaCls5Br7+L4p39Tiw2JmWLLe+s+q2dHonDq9Tw/ZamB17c/a+t91gAGmWJy9nk3h3QL6YmtxL987czWzJCyZ/KYV/8qysIwxwABTLGJsuDaMe8clEhbQK7eUlNx4a1y4XZi/mf8UvDLeGRFz6GKIEC2wf/W2uvWoddQ9CotJ7+SEdyIDKNBf6lHc7eoGokX/WX+lvbLT1TnsHobr4MVgVlA24h6BpP24nSFCnjmvydnUc9YDy67Trm+CYkhaDlqY6d6k2dU0O5s7jjuwF1lAAiHT7mvLbGUNXAMmWk4rC92BDkKmsqhKf5bW7tfWOGqqHdVZqfpVJQEJhIxtsJLtkoq9CmSRS7mtHELRIt+cr95R43chF9WWCkKmNCvhUvSjCEa5m7lZydnMkYAEQlZvq6cg+GoxkAVUgE2fTEOG5gWWAll6xYYCEgiZ77+PlIn5t4MgdaJrLBZr22uDBXaIJXgn81UuFONOwadYgP8I7+fpULExuCRefB2HmomnQDWwQJC5wzmaU7wMR4tX6P+hgG6tSCRicBrIhZpQHykRBpTxk5jSxUcutCP6jkiDnoAcxfNP32Dy3QkXB++g05VByg2OcwkGg3aXfez3WN1unRQqk2OKBU1hFA6HBUHweDzn2Z437xmYkxCYqCUAAAAASUVORK5CYII=")
  261.         Dim Normal_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAZCAIAAACKDFiYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAThJREFUOE9jZJjJIMAmoC+sH6AQAEQKvAoMmKDlXEvx8eLovdFWG6w45nDE74+//+n+f1TAUHmyEo6KjhfZbrQVWyg2/+Z8ZGUMeUfz0FDk3ki++XzI6hiSDiRhIqDtPPN44OoYwnaHYUVuW91EFohA3Mfgtd0LF1JdoRq7JxakyH6TPS5kvdGaZTYL0DAG47XGeJDYIrHus90MGis18CDpJdKWaywZZJfK4kGSiyV55/AyCC4QxI+A8cbAOpsVPwIpAmG8iGc2D2FFhksMCSsq3VFKWNHxW8cJKPJY7vH9+3d8ioBO3nthLyju8HitanMV0Bh8iio2Vjx//hySPrGYBLQFWQUWRUCXrt67Gm4GwiSgVoNFBjnrc1bsXnH9+nWIO1Aywv79+w8fPnz+/PnHjx9jSkOUAgBV+nww3EO/fQAAAABJRU5ErkJggg==")
  262.         Dim Normal_BG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADYAAAAZCAIAAAD13UppAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAH9JREFUWEdjZJjJMNhBy7mWQY4YKk9WDnLEkHc0b5AjhqQDSYMcMYTtDhvkiMFru9cgR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9H8ye3pr3d3d9a/1UxXahPZhFhAwj5G+2MVHVegT0XdEa9CT/hew5ef/fN7hdydUVnZX6HTjIOIGx1wCgYDji0P9UV1iL2GmoilGSNAthG5vb/1+v9frPYi1/gEakOtUbEwcoQAAAABJRU5ErkJggg==")
  265.         Dim Hover_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAZCAIAAACKDFiYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAASlJREFUOE9jZJjJIMAmoC+sH6AQAEQKvAoMmGDujbkQZLXBimMOR/z++Puf7v9HBQxTr05FRrYbbcUWis2/OR9ZGUPvxV5MxDefD1kdQ+u5VqyIZx4PXB1DzakaXEhkgQjEfQzFx4txIdUVqrF7YkGKso9k40Ess1mAhjEkHUzCg8QWiXWf7WaI3BuJH1musWQI3BmIH/HO4WXw2OqBHwHjjYF/Pj8Esc5mxYpAiuASIA42xDObB7sEsmrDJYaEFZXuKCWs6Pit4wQUeSz3+P79Oz5FQCfvvbAXFHe4PAUUr9pcBTQGn6KKjRXPnz+HpE8sJgFtQVaBRRHQpav3roabgTAJqNVgkUHO+pwVu1dcv34d4g6UjHDmzJnDhw+fP3/+8ePHmNIQpQAAmaPsN2aELAAAAABJRU5ErkJggg==")
  266.         Dim Hover_BG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADYAAAAZCAIAAAD13UppAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIFJREFUWEft1iEKgEAUhOExbPZa1o3WrUar1WjcICKewmAwCIIgIhgEjyPeYcMP7uM7wDBTXqJW9OufHk7+9nBqrgZO9VnDqdorOJVbCadiLeDkFgenfM7hZCcLp2zM4JQOKZxMZ+D0fTpw9HzfrwivMEYMNFEcOkSRscWftHjg7wWoQvM8R5DyyQAAAABJRU5ErkJggg==")
  267.  
  268.         Dim Click_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAABYAAAAZCAIAAAC6gEm5AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAA2VJREFUOE+NlF0sW2EYgN/q2SGcSDYTysiWzFQkZqQhfuIC1ZslbGEL0SiJLK0RpaddWWa6NmwI5meqNTtd43czuvqrvyqziyUuxdV+XLjaLTdL7D07QquGL8/FOd857/O97/ud8/EODg7Aa/zc+Wn/andsObZ/b+/92fPh+Xi/czyDCvfx49cPebs8qioq9Vnq3da7hT2Fsn5ZmbnsDMA9nrExscrY9Mb0hz0P5Ra5clSpmdDUTdXVT9XX2/7LscJit0Qpo3JacmSDssejj1WTqob5huaV5s71zs4vLM3O5oaFBnqGrrZXu3OoYD4zN6pviNvEUkZaPlqunlEbVg36Vb3OpWt0NXLo1nT6Nb1h3UAv0eXT5Uewiu+/vt9U3kxpSskfyC8ZKamdr32y/ES9rKadNL1K0y4P1C61dl1b46wpni0umilCWEVZe5nwqVDcK75vvS+fllc6KisWKxTLCsWKQuFUyJ1ybypXKx+tPMqbycudzgVM4WrV1YSXCdnm7AfjD0pnS6VzUg8WpFJPipeKpUtS2YqswFEgtouhbaQtXBue2JGYMZhRMFVw7/M9dJ9N7lwukjefl+/IT59Mh4zGjIjnEXFdcWnv0yQTkqzJrCzbOWTaMjly7Dkpn1IguDY4zBB2q/tWsjU5aSxJNC4SfTiPjyLRP5InkpMmkoCsIYObgq91X7ttvR0zFCMcFp5kRCj0JHo4miNmJCZuLA4IFUEZqMuvL18fvC54JxAwXlgEAk9CmdAQJgTBi0hrJATWBRJ6gmwng0xBlIkKMAUEmM/B3+zPQQ1QVwavwB39HXgB0AZkL8nv40MfXByinyD7SVANqDgFv5tPGsmLx+ObGM838mHj2wboAFqB18Xz6/fjveF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SRyL7AFsA2yBLWyr1+v3SLsAYVB+VF6Vrhpv17Z4K9O8y8f5xIxMksbSRVGAEHiT3lqtJn13zVK7oYwovSd/jabUCoh7RMB2ZEsL6VbjTykKyj2lMW5c/bLK5/lKpSLt0fYjFIvFUqlULper1WrnWFJ/AfiRdaa+FFYwAAAAAElFTkSuQmCC")
  270.         Dim Click_BG As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADYAAAAZCAIAAAD13UppAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAINJREFUWEft1CEOg1AQRdFbgcbjEHg0C0DjkSQYFJ5tVBDSVNRUIEgIINlad4BC3CZ/chbw8mYyj7RLkU/zauQY1kGOfuvlaPdWjvqo5aj2So5yK+UolkKOfM7lyL6ZHMknkSN+x3JEUyQHo16IeMeKQouhRcsNWHJc/L5/iPgEuVM/P1yHAgCiKbOGAAAAAElFTkSuQmCC")
  271.         G.Clear(Color.Fuchsia)
  272.  
  273.         If State = MouseState.Down Then
  274.             For i = 0 To RoundUp(Width / 54)
  275.                 G.DrawImage(Click_BG, i * 54, 0)
  276.             Next
  277.             G.DrawImage(Click_Left, 0, 0, 22, 25)
  278.             G.DrawImage(Click_Right, Width - 11, 0, 11, 25)
  279.         ElseIf State = MouseState.None Then
  280.             For i = 0 To RoundUp(Width / 54)
  281.                 G.DrawImage(Normal_BG, i * 54, 0)
  282.             Next
  283.             G.DrawImage(Normal_Left, 0, 0, 22, 25)
  284.             G.DrawImage(Normal_Right, Width - 12, 0, 12, 25)
  285.         ElseIf State = MouseState.Over Then
  286.             For i = 0 To RoundUp(Width / 54)
  287.                 G.DrawImage(Hover_BG, i * 54, 0)
  288.             Next
  289.             G.DrawImage(Hover_Left, 0, 0, 22, 25)
  290.             G.DrawImage(Hover_Right, Width - 11, 0, 11, 25)
  291.         End If
  292.         G.SmoothingMode = SmoothingMode.AntiAlias
  293.         G.DrawString(Text, New Font("Arial", 10, FontStyle.Bold), New SolidBrush(Color.White), 25, 4)
  294.         Try
  295.             G.DrawImage(Image, 7, 7, 12, 12)
  296.         Catch ex As Exception
  297.  
  298.         End Try
  299.     End Sub
  300. End Class
  301. Class SkypeTheme
  302.     Inherits ThemeContainer154
  303.  
  304.     Sub New()
  305.         TransparencyKey = Color.Fuchsia
  306.  
  307.     End Sub
  308.  
  309.     Protected Overrides Sub ColorHook()
  310.     End Sub
  311.  
  312.     Private RT1 As Rectangle
  313.  
  314.     Protected Overrides Sub PaintHook()
  315.         G.Clear(Color.FromArgb(148, 195, 255))
  316.         G.DrawRectangle(New Pen(Color.FromArgb(105, 142, 191)), 0, 0, Width - 1, Height - 1)
  317.  
  318.         DrawGradient(Color.FromArgb(241, 247, 255), Color.FromArgb(148, 195, 255), 1, 1, Width - 2, 25)
  319.         DrawGradient(Color.FromArgb(211, 230, 255), Color.FromArgb(148, 195, 255), 2, 2, Width - 4, 25)
  320.  
  321.         G.DrawString(Text, New Font("Arial", 10, FontStyle.Bold), New SolidBrush(Color.FromArgb(51, 51, 51)), 5, 3)
  322.     End Sub
  323. End Class
  324. Class SkypeGroupbox : Inherits ContainerControl
  325.     Private Function CodeToImage(ByVal Code As String) As Image
  326.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  327.     End Function
  328.     Sub New()
  329.         SetStyle(ControlStyles.UserPaint Or ControlStyles.SupportsTransparentBackColor, True)
  330.         BackColor = Color.White
  331.         DoubleBuffered = True
  332.     End Sub
  333.     Public Function RoundUp(ByVal d As Double) As Integer
  334.         If d.ToString.Contains(",") Then
  335.             Return CInt(d.ToString.Split(",")(0)) + 1
  336.         Else
  337.             Return CInt(d)
  338.         End If
  339.     End Function
  340.     Private _BottomBar As Boolean = False
  341.     Property BottomBar() As Boolean
  342.         Get
  343.             Return _BottomBar
  344.         End Get
  345.         Set(ByVal value As Boolean)
  346.             _BottomBar = value
  347.             Invalidate()
  348.         End Set
  349.     End Property
  350.     Private _CaptionImage As Image
  351.     Property CaptionImage() As Image
  352.         Get
  353.             Return _CaptionImage
  354.         End Get
  355.         Set(ByVal value As Image)
  356.             _CaptionImage = value
  357.             Invalidate()
  358.         End Set
  359.     End Property
  360.     Private _Caption As Boolean = False
  361.     Property CaptionText() As String
  362.         Get
  363.             Return _CaptionText
  364.         End Get
  365.         Set(ByVal value As String)
  366.             _CaptionText = value
  367.             Invalidate()
  368.         End Set
  369.     End Property
  370.     Private _CaptionText As String = ""
  371.     Property Caption() As Boolean
  372.         Get
  373.             Return _Caption
  374.         End Get
  375.         Set(ByVal value As Boolean)
  376.             _Caption = value
  377.             Invalidate()
  378.         End Set
  379.     End Property
  380.     Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  381.         Dim Corner_Left_Top As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADxJREFUGFdj7Nn3/8/vn98+vf35/QtDx84fFYtvT9z84Oqjzwx1q58CWd9//v3//z9D+aKbVx59BrKAAAAObiiiSPYygwAAAABJRU5ErkJggg==")
  382.         Dim Corner_Right_Top As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADlJREFUGFdjLF90k52Th4tPmIWVneHqo88TNz+oWHy7Y+cPhv///3//+RfIr1v9FMQBgiuPPgPVAwCozR/5eeWQ5wAAAABJRU5ErkJggg==")
  383.         Dim Corner_Left_Bot As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACJJREFUGFdjKF908z8MMNStforgdOz8geD07PsP5APlgeoBWv0poRMgjd8AAAAASUVORK5CYII=")
  384.         Dim Corner_Right_Bot As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAClJREFUGFdj/P//PwMYVCy+xQDkQEDd6qcITsfOHwzli24CxYCsnn3/AWDMI6v3pdX3AAAAAElFTkSuQmCC")
  385.  
  386.         Dim Corner_Left_Bot_New As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADVJREFUGFdjLF90M9hCXJiXlQEIqpc/mLD5wd3nX4GIoX37N6AkkH/q1geGnn3/gXygPFAIAJkXHaCX6UBVAAAAAElFTkSuQmCC")
  387.         Dim Corner_Right_Bot_New As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADdJREFUGFdjvPv8KwMDw9vPv9eeeMkA5ADRhM0Pqpc/YDh16wOQVb7oZvv2bwxACigGZPXs+w8AgtEi2UaAmzcAAAAASUVORK5CYII=")
  388.  
  389.         Dim OnePxImg As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAADIAAAATCAIAAABdrcl1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAEJJREFUSEtjvPv8K8MgBEBnDULEMAjdBIrAUWeRkFpGQ4uUvDUaWqOhRULmIqkkGk1bo2lrNG2RlGVopHg0J5KSEwFcyJWmO09UYwAAAABJRU5ErkJggg==")
  390.  
  391.         Dim CaptionCorner_Left As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACdJREFUGFdjXHrm/68f3z69f80w78jXnnU3Vx56zDBh8wMg9evXLwBQYRY9ipWOggAAAABJRU5ErkJggg==")
  392.         Dim CaptionCorner_Right As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACdJREFUGFdjnLj5AZ+gKBsHF8PKQ4971t2cd+Qrw69fv4CcCZsfAADNdxCJDpD+PwAAAABJRU5ErkJggg==")
  393.  
  394.         Dim B As New Bitmap(Width, Height)
  395.         Dim G As Graphics = Graphics.FromImage(B)
  396.         Dim Body As New Rectangle(4, 25, Width - 9, Height - 30)
  397.         Dim Body2 As New Rectangle(0, 0, Width - 1, Height - 1)
  398.  
  399.         MyBase.OnPaint(e)
  400.  
  401.         G.Clear(Color.Transparent)
  402.  
  403.         G.SmoothingMode = SmoothingMode.HighQuality
  404.         G.CompositingQuality = CompositingQuality.HighQuality
  405.  
  406.         G.DrawImage(Corner_Left_Top, 0, 0, 4, 4)
  407.         G.DrawImage(Corner_Right_Top, Width - 4, 0, 4, 4)
  408.  
  409.         If _Caption = True Then
  410.             Dim DrawGradientBrush = New LinearGradientBrush(New Rectangle(0, 2, Width - 1, 29), Color.FromArgb(241, 241, 241), Color.FromArgb(218, 218, 218), 90.0F)
  411.             G.FillRectangle(DrawGradientBrush, New Rectangle(0, 2, Width - 1, 29))
  412.             G.DrawLine(Pens.White, 1, 1, Width - 1, 1)
  413.             G.DrawImage(CaptionCorner_Left, 0, 0, 3, 3)
  414.             G.DrawImage(CaptionCorner_Right, Width - 3, 0, 3, 3)
  415.             G.DrawLine(New Pen(Color.FromArgb(203, 203, 203)), 0, 31, Width - 1, 31)
  416.             Try
  417.                 G.DrawImage(_CaptionImage, 9, 9, 16, 16)
  418.                 G.DrawString(_CaptionText, New Font("Arial", 10, FontStyle.Bold), New SolidBrush(Color.FromArgb(51, 51, 51)), 30, 8)
  419.             Catch ex As Exception
  420.  
  421.             End Try
  422.         End If
  423.  
  424.         If _BottomBar = True Then
  425.             For i = 0 To RoundUp(Width / 50)
  426.                 G.DrawImage(OnePxImg, i * 50, Height - 20)
  427.             Next
  428.             G.DrawLine(New Pen(Color.FromArgb(217, 217, 217)), 1, Height - 21, Width - 2, Height - 21)
  429.             G.DrawRectangle(New Pen(Color.FromArgb(119, 162, 217)), 0, 0, Width - 1, Height - 1)
  430.             G.DrawImage(Corner_Left_Bot_New, 0, Height - 4, 4, 4)
  431.             G.DrawImage(Corner_Right_Bot_New, Width - 4, Height - 4, 4, 4)
  432.             G.DrawString(Text, New Font("Arial", 8), New SolidBrush(Color.FromArgb(153, 153, 153)), 4, Height - 17)
  433.         Else
  434.             G.DrawImage(Corner_Left_Bot, 0, Height - 4, 4, 4)
  435.             G.DrawImage(Corner_Right_Bot, Width - 4, Height - 4, 4, 4)
  436.             G.DrawRectangle(New Pen(Color.FromArgb(119, 162, 217)), 0, 0, Width - 1, Height - 1)
  437.         End If
  438.  
  439.         B.SetPixel(0, Height - 1, Color.FromArgb(148, 195, 255))
  440.         B.SetPixel(Width - 1, Height - 1, Color.FromArgb(148, 195, 255))
  441.         B.SetPixel(Width - 1, 0, Color.FromArgb(148, 195, 255))
  442.         B.SetPixel(0, 0, Color.FromArgb(148, 195, 255))
  443.  
  444.         e.Graphics.DrawImage(B.Clone(), 0, 0)
  445.         G.Dispose() : B.Dispose()
  446.     End Sub
  447. End Class
  448. <DefaultEvent("TextChanged")> _
  449. Class SkypeTextbox
  450.     Inherits ThemeControl154
  451.  
  452.     Private _TextAlign As HorizontalAlignment = HorizontalAlignment.Left
  453.     Property TextAlign() As HorizontalAlignment
  454.         Get
  455.             Return _TextAlign
  456.         End Get
  457.         Set(ByVal value As HorizontalAlignment)
  458.             _TextAlign = value
  459.             If Base IsNot Nothing Then
  460.                 Base.TextAlign = value
  461.             End If
  462.         End Set
  463.     End Property
  464.     Private _MaxLength As Integer = 32767
  465.     Property MaxLength() As Integer
  466.         Get
  467.             Return _MaxLength
  468.         End Get
  469.         Set(ByVal value As Integer)
  470.             _MaxLength = value
  471.             If Base IsNot Nothing Then
  472.                 Base.MaxLength = value
  473.             End If
  474.         End Set
  475.     End Property
  476.     Private _ReadOnly As Boolean
  477.     Property [ReadOnly]() As Boolean
  478.         Get
  479.             Return _ReadOnly
  480.         End Get
  481.         Set(ByVal value As Boolean)
  482.             _ReadOnly = value
  483.             If Base IsNot Nothing Then
  484.                 Base.ReadOnly = value
  485.             End If
  486.         End Set
  487.     End Property
  488.     Private _UseSystemPasswordChar As Boolean
  489.     Property UseSystemPasswordChar() As Boolean
  490.         Get
  491.             Return _UseSystemPasswordChar
  492.         End Get
  493.         Set(ByVal value As Boolean)
  494.             _UseSystemPasswordChar = value
  495.             If Base IsNot Nothing Then
  496.                 Base.UseSystemPasswordChar = value
  497.             End If
  498.         End Set
  499.     End Property
  500.     Private _Multiline As Boolean
  501.     Property Multiline() As Boolean
  502.         Get
  503.             Return _Multiline
  504.         End Get
  505.         Set(ByVal value As Boolean)
  506.             _Multiline = value
  507.             If Base IsNot Nothing Then
  508.                 Base.Multiline = value
  509.  
  510.                 If value Then
  511.                     LockHeight = 0
  512.                     Base.Height = Height - 11
  513.                 Else
  514.                     LockHeight = Base.Height + 11
  515.                 End If
  516.             End If
  517.         End Set
  518.     End Property
  519.     Overrides Property Text As String
  520.         Get
  521.             Return MyBase.Text
  522.         End Get
  523.         Set(ByVal value As String)
  524.             MyBase.Text = value
  525.             If Base IsNot Nothing Then
  526.                 Base.Text = value
  527.             End If
  528.         End Set
  529.     End Property
  530.     Overrides Property Font As Font
  531.         Get
  532.             Return MyBase.Font
  533.         End Get
  534.         Set(ByVal value As Font)
  535.             MyBase.Font = value
  536.             If Base IsNot Nothing Then
  537.                 Base.Font = value
  538.                 Base.Location = New Point(3, 5)
  539.                 Base.Width = Width - 6
  540.  
  541.                 If Not _Multiline Then
  542.                     LockHeight = Base.Height + 11
  543.                 End If
  544.             End If
  545.         End Set
  546.     End Property
  547.  
  548.     Protected Overrides Sub OnCreation()
  549.         If Not Controls.Contains(Base) Then
  550.             Controls.Add(Base)
  551.         End If
  552.     End Sub
  553.  
  554.     Private Base As TextBox
  555.     Sub New()
  556.         Base = New TextBox
  557.  
  558.         Base.Font = Font
  559.         Base.Text = Text
  560.         Base.MaxLength = _MaxLength
  561.         Base.Multiline = _Multiline
  562.         Base.ReadOnly = _ReadOnly
  563.         Base.UseSystemPasswordChar = _UseSystemPasswordChar
  564.  
  565.         Base.BorderStyle = BorderStyle.None
  566.  
  567.         Base.Location = New Point(4, 4)
  568.         Base.Width = Width - 10
  569.  
  570.         If _Multiline Then
  571.             Base.Height = Height - 11
  572.         Else
  573.             LockHeight = Base.Height + 11
  574.         End If
  575.  
  576.         AddHandler Base.TextChanged, AddressOf OnBaseTextChanged
  577.         AddHandler Base.KeyDown, AddressOf OnBaseKeyDown
  578.     End Sub
  579.  
  580.  
  581.     Protected Overrides Sub ColorHook()
  582.         Base.ForeColor = Color.Gray
  583.         Base.BackColor = Color.White
  584.     End Sub
  585.  
  586.     Protected Overrides Sub PaintHook()
  587.         G.Clear(Color.White)
  588.         DrawBorders(New Pen(Color.FromArgb(194, 194, 194)))
  589.         G.DrawLine(New Pen(Color.FromArgb(243, 243, 243)), 1, 1, Width - 2, 1)
  590.         G.DrawLine(New Pen(Color.FromArgb(243, 243, 243)), 1, 2, Width - 2, 2)
  591.         G.DrawLine(New Pen(Color.FromArgb(245, 245, 245)), 1, 3, Width - 2, 3)
  592.         G.DrawLine(New Pen(Color.FromArgb(249, 249, 249)), 1, 4, Width - 2, 4)
  593.         G.DrawLine(New Pen(Color.FromArgb(252, 252, 252)), 1, 5, Width - 2, 5)
  594.     End Sub
  595.     Private Sub OnBaseTextChanged(ByVal s As Object, ByVal e As EventArgs)
  596.         Text = Base.Text
  597.     End Sub
  598.     Private Sub OnBaseKeyDown(ByVal s As Object, ByVal e As KeyEventArgs)
  599.         If e.Control AndAlso e.KeyCode = Keys.A Then
  600.             Base.SelectAll()
  601.             e.SuppressKeyPress = True
  602.         End If
  603.     End Sub
  604.     Protected Overrides Sub OnResize(ByVal e As EventArgs)
  605.         Base.Location = New Point(4, 5)
  606.         Base.Width = Width - 8
  607.  
  608.         If _Multiline Then
  609.             Base.Height = Height - 5
  610.         End If
  611.  
  612.  
  613.         MyBase.OnResize(e)
  614.     End Sub
  615.  
  616. End Class
  617. <DefaultEvent("CheckedChanged")> _
  618. Class SkypeCheckbox
  619.     Inherits ThemeControl154
  620.     Private Function CodeToImage(ByVal Code As String) As Image
  621.         Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
  622.     End Function
  623.     Sub New()
  624.         LockHeight = 14
  625.         LockWidth = 14
  626.     End Sub
  627.  
  628.     Protected Overrides Sub ColorHook()
  629.      
  630.     End Sub
  631.  
  632.     Protected Overrides Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
  633.         MyBase.OnMouseMove(e)
  634.         Invalidate()
  635.     End Sub
  636.  
  637.     Protected Overrides Sub PaintHook()
  638.         Dim ImgChecked As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAIAAACQKrqGAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAASlJREFUKFNj+E8I8DatVVNTkwpKYwCqZFhwm2HqGayIqfegop6xop4RSBlQXen+239wgOzsbAUFBZ6CqWClU8/8/v37MTawZMkSGRmZ6OhooBqo0p8/fz7EAJcvX9bW1lZUVLx//z5C6bdv33bv3i0lJeXh4XH37l2gHBDExsYKCwt3d3cDZRFKP336dOfOncmTJ/Px8WVkZADZc+fOBbIdHR2BbKAsQum7d+9ugUF6ejoXF1d1dTXQK4KCgnv37gUKAmURSl+9enUDDK5du2ZlZcUGBlVVVRBBoCxC6ZMnT67CwJEjR6SlpfX19YHegogBZRFKgZ4ASsDBypUrN2zYAOeihMDt27cv4gZAWZipC24nrz0JdCUuAJQFxigoCvCnAVDCAKsDAgBvkZJ5r5lP9QAAAABJRU5ErkJggg==")
  639.         Dim ImgNoChecked As Image = CodeToImage("iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAIAAACQKrqGAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAI9JREFUKFONkjEKhDAQRd2z7hk8in0usGewFmyWxUUcQWRTpUiRIhCyEL+iTPXBR7r3CAwzj1JKdZM9NVI1PX1G0Bw/Gqlb+XNg0Rxp0+ecfxxYNGeaUlo5sJrGGBcOrKYhhJkDq6n3fuLAauqcGzmwmlprBw6sphjpw4HVVETeHNgrNfJ8dV8O7Lmt+zewAahirSfxCAkLAAAAAElFTkSuQmCC")
  640.  
  641.         G.Clear(Color.FromArgb(51, 51, 51))
  642.         If _Checked Then
  643.             G.DrawImage(ImgChecked, 0, 0, 14, 14)
  644.         Else
  645.             G.DrawImage(ImgNoChecked, 0, 0, 14, 14)
  646.         End If
  647.  
  648.     End Sub
  649.  
  650.     Private _Checked As Boolean
  651.     Property Checked() As Boolean
  652.         Get
  653.             Return _Checked
  654.         End Get
  655.         Set(ByVal value As Boolean)
  656.             _Checked = value
  657.             Invalidate()
  658.         End Set
  659.     End Property
  660.  
  661.     Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  662.         _Checked = Not _Checked
  663.         RaiseEvent CheckedChanged(Me)
  664.         MyBase.OnMouseDown(e)
  665.     End Sub
  666.  
  667.     Event CheckedChanged(ByVal sender As Object)
  668.  
  669. End Class
  670. #End Region
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top