Thread: Mpgh Theme

Results 1 to 11 of 11
  1. #1
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic

    Mpgh Theme

    i spent 2 mins on it....

    its a color mod of my theme RedDwagon v2



    Bugs,

    Argb for the button Looks WEIRD

    PLEASE KEEP CREDITS IN CODE THATS ALL I ASK!

    Code:
    Imports System, System.IO, System.Collections.Generic
    Imports System.Drawing, System.Drawing.Drawing2D
    Imports System.ComponentModel, System.Windows.Forms
    
    '------------------
    'ThemeName: Mpgh
    'Creator: Immortal- , Cosconub
    'Site: https://www.mpgh.net/forum/members/607818-cosconub.html
    'Created: 8/11/2011
    'Changed: 8/11/2011
    'Version: 1.5.0
    '------------------
    
    Class MpghTheme
        Inherits ThemeContainer
    
    
        Protected Overrides Sub ColorHook()
            ' TODO
        End Sub
    
        Protected Overrides Sub PaintHook()
    
            DrawGradient(Color.FromArgb(0, 0, 128), Color.FromArgb(35, 107, 142), 0, 0, Width, 55, 180S) ' Top Top
            DrawGradient(Color.FromArgb(35, 107, 142), Color.FromArgb(0, 0, 128), 0, 0, Width, 55, 90S) ' Top Top
            DrawGradient(Color.FromArgb(34, 34, 34), Color.FromArgb(34, 34, 34), 0, 56, Width, Height - 55, 90S) ' Middel Bottom
            DrawGradient(Color.FromArgb(34, 34, 34), Color.FromArgb(34, 34, 34), 0, 84, Width, 35, 90S) ' Midel Top
            G.DrawLine(Pens.Black, 0, 28, Width, 28)
            G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(1, 0, 0, 0))), 0, 29, Width, 29)
            DrawCorners(TransparencyKey)
    
            DrawText(Brushes.White, HorizontalAlignment.Left, 6, 5)
    
            Dim p4 As Pen = New Pen(Color.FromArgb(34, 34, 34))
            Dim ClientPtA, ClientPtB As Int32
    
            ClientPtA = 55
            ClientPtB = 30
            For I As Integer = 0 To Width + 17 Step 4
                G.DrawLine(p4, I, 30, I - 17, ClientPtA)
                G.DrawLine(p4, I - 1, 30, I - 18, ClientPtA)
            Next
        End Sub
    End Class
    
    Class MpghProgressBar
        Inherits ThemeControl
        Private _Maximum As Integer
        Public Property Maximum() As Integer
            Get
                Return _Maximum
            End Get
            Set(ByVal v As Integer)
                Select Case v
                    Case Is < _Value
                        _Value = v
                End Select
                _Maximum = v
                Invalidate()
            End Set
        End Property
        Private _Value As Integer
        Public Property Value() As Integer
            Get
                Select Case _Value
                    Case 0
                        Return 1
                    Case Else
                        Return _Value
                End Select
            End Get
            Set(ByVal v As Integer)
                Select Case v
                    Case Is > _Maximum
                        v = _Maximum
                End Select
                _Value = v
                Invalidate()
            End Set
        End Property
        Protected Overrides Sub ColorHook()
    
        End Sub
    
        Protected Overrides Sub PaintHook()
            G.Clear(Color.FromArgb(34, 34, 34))
            Select Case _Value
                Case Is > 1
                    DrawGradient(Color.FromArgb(0, 0, 128), Color.FromArgb(35, 107, 142), 3, 3, CInt(_Value / _Maximum * Width) - 6, Height - 6, 90S)
                    DrawGradient(Color.FromArgb(35, 107, 142), Color.FromArgb(0, 0, 128), 4, 4, CInt(_Value / _Maximum * Width) - 8, Height - 8, 90S)
                Case Is > 0
                    DrawGradient(Color.FromArgb(0, 0, 128), Color.FromArgb(35, 107, 142), 3, 3, CInt(_Value / _Maximum * Width) - 6, Height - 6, 90S)
                    DrawGradient(Color.FromArgb(35, 107, 142), Color.FromArgb(0, 0, 128), 4, 4, CInt(_Value / _Maximum * Width) - 8, Height - 8, 90S)
            End Select
            G.DrawRectangle(Pens.Black, 0, 0, Width - 1, Height - 1)
            G.DrawRectangle(Pens.Blue, 1, 1, Width - 3, Height - 3)
    
        End Sub
    End Class
    
    Class MpghCheckBox
        Inherits ThemeControl
        Private _CheckedState As Boolean
        Public Property CheckedState() As Boolean
            Get
                Return _CheckedState
            End Get
            Set(ByVal v As Boolean)
                _CheckedState = v
                Invalidate()
            End Set
        End Property
        Sub New()
            Size = New Size(108, 16)
            MinimumSize = New Size(16, 16)
            MaximumSize = New Size(600, 16)
            CheckedState = False
        End Sub
        Protected Overrides Sub ColorHook()
    
        End Sub
        Protected Overrides Sub PaintHook()
    
            Dim FontColor As Color
            FontColor = Color.White
    
            G.Clear(Color.FromArgb(34, 34, 34))
            Select Case CheckedState
                Case True
                    DrawGradient(Color.FromArgb(0, 0, 128), Color.FromArgb(35, 107, 142), 3, 3, 9, 9, 90S)
                    DrawGradient(Color.FromArgb(0, 0, 128), Color.FromArgb(35, 107, 142), 4, 4, 7, 7, 90S)
                Case False
                    DrawGradient(Color.FromArgb(34, 34, 34), Color.FromArgb(34, 34, 34), 0, 0, 15, 15, 90S)
            End Select
            G.DrawRectangle(Pens.Black, 0, 0, 14, 14)
            G.DrawRectangle(Pens.Blue, 1, 1, 12, 12)
            DrawText(Brushes.White, HorizontalAlignment.Left, 17, 0)
        End Sub
        Sub changeCheck() Handles Me.Click
            Select Case CheckedState
                Case True
                    CheckedState = False
                Case False
                    CheckedState = True
            End Select
        End Sub
    End Class
    
    Class MpghButton
        Inherits ThemeControl
    
    
        Private P1, P2 As Pen
        Private C1, C2 As Color
    
        Sub New()
            C2 = Color.FromArgb(0, 0, 228)
            C1 = Color.FromArgb(50, 34, 34, 34)
        End Sub
    
        Protected Overrides Sub PaintHook()
    
            If State = MouseState.Down Then
                DrawGradient(C1, C2, 0, 0, Width, Height, 90S)
            Else
                DrawGradient(C2, C1, 0, 0, Width, Height, 90S)
            End If
    
            DrawText(Brushes.Black, HorizontalAlignment.Center, 0, 0)
            DrawBorders(Pens.Transparent, ClientRectangle)
    
            DrawCorners(Color.FromArgb(34, 34, 34), ClientRectangle)
        End Sub
    
        Protected Overrides Sub ColorHook()
    
        End Sub
    End Class

    Put that in a new Class named THEME

    Now put this in a new class called THEMEBASE

    Code:
    Imports System, System.IO, System.Collections.Generic
    Imports System.Drawing, System.Drawing.Drawing2D
    Imports System.ComponentModel, System.Windows.Forms
    
    '------------------
    'Creator: aeonhack
    'Site: elitevs.net
    'Created: 8/2/2011
    'Changed: 8/11/2011
    'Version: 1.5.0
    '------------------
    
    Enum MouseState As Byte
        None = 0
        Over = 1
        Down = 2
        Block = 3
    End Enum
    
    Class Bloom
    
        Private _Name As String
        Property Name() As String
            Get
                Return _Name
            End Get
            Set(ByVal value As String)
                _Name = value
            End Set
        End Property
    
        Private _Value As Color
        Property Value() As Color
            Get
                Return _Value
            End Get
            Set(ByVal value As Color)
                _Value = value
            End Set
        End Property
    
        Sub New()
        End Sub
    
        Sub New(ByVal name As String, ByVal value As Color)
            _Name = name
            _Value = value
        End Sub
    End Class
    
    MustInherit Class ThemeContainer
        Inherits ContainerControl
    
        Private _LockWidth As Integer
        Protected Sub LockWidth(ByVal lockWidth As Integer)
            _LockWidth = lockWidth
            If Not lockWidth = 0 AndAlso IsHandleCreated Then Width = lockWidth
        End Sub
    
        Private _LockHeight As Integer
        Protected Sub LockHeight(ByVal lockHeight As Integer)
            _LockHeight = lockHeight
            If Not lockHeight = 0 AndAlso IsHandleCreated Then Height = lockHeight
        End Sub
    
        Protected Overrides Sub SetBoundsCore(ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal specified As BoundsSpecified)
            If Not _LockWidth = 0 Then width = _LockWidth
            If Not _LockHeight = 0 Then height = _LockHeight
            MyBase.SetBoundsCore(x, y, width, height, specified)
        End Sub
    
        Protected G As Graphics
    
        Sub New()
            SetStyle(DirectCast(139270, ControlStyles), True)
            _ImageSize = Size.Empty
    
            MeasureBitmap = New Bitmap(1, 1)
            MeasureGraphics = Graphics.FromImage(MeasureBitmap)
    
            InvalidateCustimization()
        End Sub
    
        Private Header As Rectangle
        Protected NotOverridable Overrides Sub OnSizeChanged(ByVal e As EventArgs)
            MyBase.OnSizeChanged(e)
            If _Movable Then Header = New Rectangle(7, 7, Width - 14, _MoveHeight - 7)
            Invalidate()
        End Sub
    
        Protected NotOverridable Overrides Sub OnPaint(ByVal e As PaintEventArgs)
            If Width = 0 OrElse Height = 0 Then Return
            G = e.Graphics
            PaintHook()
        End Sub
    
        Private IsParentForm As Boolean
        Protected NotOverridable Overrides Sub OnHandleCreated(ByVal e As EventArgs)
            InitializeMessages()
            InvalidateCustimization()
            ColorHook()
    
            IsParentForm = TypeOf Parent Is Form
            Dock = DockStyle.Fill
    
            If Not _LockWidth = 0 Then Width = _LockWidth
            If Not _LockHeight = 0 Then Height = _LockHeight
            If Not BackColorWait = Nothing Then BackColor = BackColorWait
    
            If IsParentForm Then
                ParentForm.FormBorderStyle = _BorderStyle
                ParentForm.TransparencyKey = _TransparencyKey
            End If
    
            MyBase.OnHandleCreated(e)
        End Sub
    
    #Region " Sizing and Movement "
    
        Protected State As MouseState
        Private Sub SetState(ByVal current As MouseState)
            State = current
            Invalidate()
        End Sub
    
        Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
            If _Sizable Then InvalidateMouse()
            MyBase.OnMouseMove(e)
        End Sub
    
        Protected Overrides Sub OnEnabledChanged(ByVal e As EventArgs)
            If Enabled Then SetState(MouseState.None) Else SetState(MouseState.Block)
            MyBase.OnEnabledChanged(e)
        End Sub
    
        Protected Overrides Sub OnMouseEnter(ByVal e As EventArgs)
            SetState(MouseState.Over)
            MyBase.OnMouseEnter(e)
        End Sub
    
        Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
            SetState(MouseState.Over)
            MyBase.OnMouseUp(e)
        End Sub
    
        Protected Overrides Sub OnMouseLeave(ByVal e As EventArgs)
            SetState(MouseState.None)
            MyBase.OnMouseLeave(e)
        End Sub
    
        Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
            MyBase.OnMouseDown(e)
    
            If Not e.Button = Windows.Forms.MouseButtons.Left Then Return
            SetState(MouseState.Down)
    
            If IsParentForm AndAlso ParentForm.WindowState = FormWindowState.Maximized Then Return
    
            If _Movable AndAlso Header.Contains(e.Location) Then
                Capture = False
                DefWndProc(Messages(0))
            ElseIf _Sizable AndAlso Not Previous = 0 Then
                Capture = False
                DefWndProc(Messages(Previous))
            End If
        End Sub
    
        Private GetIndexPoint As Point
        Private B1, B2, B3, B4 As Boolean
        Private Function GetIndex() As Integer
            GetIndexPoint = PointToClient(MousePosition)
            B1 = GetIndexPoint.X < 7
            B2 = GetIndexPoint.X > Width - 7
            B3 = GetIndexPoint.Y < 7
            B4 = GetIndexPoint.Y > Height - 7
    
            If B1 AndAlso B3 Then Return 4
            If B1 AndAlso B4 Then Return 7
            If B2 AndAlso B3 Then Return 5
            If B2 AndAlso B4 Then Return 8
            If B1 Then Return 1
            If B2 Then Return 2
            If B3 Then Return 3
            If B4 Then Return 6
            Return 0
        End Function
    
        Private Current, Previous As Integer
        Private Sub InvalidateMouse()
            Current = GetIndex()
            If Current = Previous Then Return
    
            Previous = Current
            Select Case Previous
                Case 0
                    Cursor = Cursors.Default
                Case 1, 2
                    Cursor = Cursors.SizeWE
                Case 3, 6
                    Cursor = Cursors.SizeNS
                Case 4, 8
                    Cursor = Cursors.SizeNWSE
                Case 5, 7
                    Cursor = Cursors.SizeNESW
            End Select
        End Sub
    
        Private Messages(8) As Message
        Private Sub InitializeMessages()
            Messages(0) = Message.Create(Parent.Handle, 161, New IntPtr(2), IntPtr.Zero)
            For I As Integer = 1 To 8
                Messages(I) = Message.Create(Parent.Handle, 161, New IntPtr(I + 9), IntPtr.Zero)
            Next
        End Sub
    
    #End Region
    
    
    #Region " Property Overrides "
    
        Private BackColorWait As Color
        Overrides Property BackColor() As Color
            Get
                Return MyBase.BackColor
            End Get
            Set(ByVal value As Color)
                If IsHandleCreated Then
                    MyBase.BackColor = value
                Else
                    BackColorWait = value
                End If
            End Set
        End Property
    
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property ForeColor() As Color
            Get
            End Get
            Set(ByVal value As Color)
            End Set
        End Property
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property BackgroundImage() As Image
            Get
                Return Nothing
            End Get
            Set(ByVal value As Image)
            End Set
        End Property
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property BackgroundImageLayout() As ImageLayout
            Get
                Return Nothing
            End Get
            Set(ByVal value As ImageLayout)
            End Set
        End Property
    
        Overrides Property Text() As String
            Get
                Return MyBase.Text
            End Get
            Set(ByVal value As String)
                MyBase.Text = value
                Invalidate()
            End Set
        End Property
    
        Overrides Property Font() As Font
            Get
                Return MyBase.Font
            End Get
            Set(ByVal value As Font)
                MyBase.Font = value
                Invalidate()
            End Set
        End Property
    
    #End Region
    
    #Region " Properties "
    
        Private _Movable As Boolean = True
        Property Movable() As Boolean
            Get
                Return _Movable
            End Get
            Set(ByVal value As Boolean)
                _Movable = value
            End Set
        End Property
    
        Private _Sizable As Boolean = True
        Property Sizable() As Boolean
            Get
                Return _Sizable
            End Get
            Set(ByVal value As Boolean)
                _Sizable = value
            End Set
        End Property
    
        Private _MoveHeight As Integer = 24
        Property MoveHeight() As Integer
            Get
                Return _MoveHeight
            End Get
            Set(ByVal v As Integer)
                If v < 8 Then Return
                Header = New Rectangle(7, 7, Width - 14, v - 7)
                _MoveHeight = v
                Invalidate()
            End Set
        End Property
    
        Private _TransparencyKey As Color
        Property TransparencyKey() As Color
            Get
                If IsParentForm Then Return ParentForm.TransparencyKey Else Return _TransparencyKey
            End Get
            Set(ByVal value As Color)
                If IsParentForm Then ParentForm.TransparencyKey = value
                _TransparencyKey = value
            End Set
        End Property
    
        Private _BorderStyle As FormBorderStyle
        Property BorderStyle() As FormBorderStyle
            Get
                If IsParentForm Then Return ParentForm.FormBorderStyle Else Return _BorderStyle
            End Get
            Set(ByVal value As FormBorderStyle)
                If IsParentForm Then ParentForm.FormBorderStyle = value
                _BorderStyle = value
            End Set
        End Property
    
        Private _NoRounding As Boolean
        Property NoRounding() As Boolean
            Get
                Return _NoRounding
            End Get
            Set(ByVal v As Boolean)
                _NoRounding = v
                Invalidate()
            End Set
        End Property
    
        Private _Image As Image
        Property Image() As Image
            Get
                Return _Image
            End Get
            Set(ByVal value As Image)
                If value Is Nothing Then
                    _ImageSize = Size.Empty
                Else
                    _ImageSize = value.Size
                End If
    
                _Image = value
                Invalidate()
            End Set
        End Property
    
        Private _ImageSize As Size
        ReadOnly Property ImageSize() As Size
            Get
                Return ImageSize
            End Get
        End Property
    
        Private Items As New Dictionary(Of String, Color)
        <DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
        Property Colors() As Bloom()
            Get
                Dim T As New List(Of Bloom)
                Dim E As Dictionary(Of String, Color).Enumerator = Items.GetEnumerator
    
                While E.MoveNext
                    T.Add(New Bloom(E.Current.Key, E.Current.Value))
                End While
    
                Return T.ToArray
            End Get
            Set(ByVal value As Bloom())
                For Each B As Bloom In value
                    If Items.ContainsKey(B.Name) Then Items(B.Name) = B.Value
                Next
    
                InvalidateCustimization()
                ColorHook()
                Invalidate()
            End Set
        End Property
    
        Private _Custimization As String
        Property Custimization() As String
            Get
                Return _Custimization
            End Get
            Set(ByVal value As String)
                If value = _Custimization Then Return
    
                Dim Data As Byte()
                Dim Items As Bloom() = Colors
    
                Try
                    Data = Convert.FromBase64String(value)
                    For I As Integer = 0 To Items.Length - 1
                        Items(I).Value = Color.FromArgb(BitConverter.ToInt32(Data, I * 4))
                    Next
                Catch
                    Return
                End Try
    
                _Custimization = value
    
                Colors = Items
                ColorHook()
                Invalidate()
            End Set
        End Property
    
    #End Region
    
    #Region " Property Helpers "
    
        Protected Function GetColor(ByVal name As String) As Color
            Return Items(name)
        End Function
    
        Protected Sub SetColor(ByVal name As String, ByVal color As Color)
            If Items.ContainsKey(name) Then Items(name) = color Else Items.Add(name, color)
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
            SetColor(name, Color.FromArgb(r, g, b))
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal a As Byte, ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
            SetColor(name, Color.FromArgb(a, r, g, b))
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal a As Byte, ByVal color As Color)
            SetColor(name, color.FromArgb(a, color))
        End Sub
    
        Private Sub InvalidateCustimization()
            Dim M As New MemoryStream(Items.Count * 4)
    
            For Each B As Bloom In Colors
                M.Write(BitConverter.GetBytes(B.Value.ToArgb), 0, 4)
            Next
    
            M.Close()
            _Custimization = Convert.ToBase64String(M.ToArray)
        End Sub
    
    #End Region
    
    
    #Region " User Hooks "
    
        Protected MustOverride Sub ColorHook()
        Protected MustOverride Sub PaintHook()
    
    #End Region
    
    
    #Region " Center Overloads "
    
        Private CenterReturn As Point
    
        Protected Function Center(ByVal r1 As Rectangle, ByVal s1 As Size) As Point
            CenterReturn = New Point((r1.Width \ 2 - s1.Width \ 2) + r1.X, (r1.Height \ 2 - s1.Height \ 2) + r1.Y)
            Return CenterReturn
        End Function
        Protected Function Center(ByVal r1 As Rectangle, ByVal r2 As Rectangle) As Point
            Return Center(r1, r2.Size)
        End Function
    
        Protected Function Center(ByVal w1 As Integer, ByVal h1 As Integer, ByVal w2 As Integer, ByVal h2 As Integer) As Point
            CenterReturn = New Point(w1 \ 2 - w2 \ 2, h1 \ 2 - h2 \ 2)
            Return CenterReturn
        End Function
    
        Protected Function Center(ByVal s1 As Size, ByVal s2 As Size) As Point
            Return Center(s1.Width, s1.Height, s2.Width, s2.Height)
        End Function
    
        Protected Function Center(ByVal r1 As Rectangle) As Point
            Return Center(ClientRectangle.Width, ClientRectangle.Height, r1.Width, r1.Height)
        End Function
        Protected Function Center(ByVal s1 As Size) As Point
            Return Center(Width, Height, s1.Width, s1.Height)
        End Function
        Protected Function Center(ByVal w1 As Integer, ByVal h1 As Integer) As Point
            Return Center(Width, Height, w1, h1)
        End Function
    
    #End Region
    
    #Region " Measure Overloads "
    
        Private MeasureBitmap As Bitmap
        Private MeasureGraphics As Graphics
    
        Protected Function Measure(ByVal text As String) As Size
            Return MeasureGraphics.MeasureString(text, Font, Width).ToSize
        End Function
        Protected Function Measure() As Size
            Return MeasureGraphics.MeasureString(Text, Font, Width).ToSize
        End Function
    
    #End Region
    
    #Region " DrawCorners Overloads "
    
        'TODO: Optimize by checking brush color
    
        Private DrawCornersBrush As SolidBrush
    
        Protected Sub DrawCorners(ByVal c1 As Color)
            DrawCorners(c1, 0, 0, Width, Height)
        End Sub
        Protected Sub DrawCorners(ByVal c1 As Color, ByVal r1 As Rectangle)
            DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height)
        End Sub
        Protected Sub DrawCorners(ByVal c1 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            If _NoRounding Then Return
    
            DrawCornersBrush = New SolidBrush(c1)
            G.FillRectangle(DrawCornersBrush, x, y, 1, 1)
            G.FillRectangle(DrawCornersBrush, x + (width - 1), y, 1, 1)
            G.FillRectangle(DrawCornersBrush, x, y + (height - 1), 1, 1)
            G.FillRectangle(DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1)
        End Sub
    
    #End Region
    
    #Region " DrawBorders Overloads "
    
        'TODO: Remove triple overload?
    
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal offset As Integer)
            DrawBorders(p1, x + offset, y + offset, width - (offset * 2), height - (offset * 2))
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal offset As Integer)
            DrawBorders(p1, 0, 0, Width, Height, offset)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal r As Rectangle, ByVal offset As Integer)
            DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset)
        End Sub
    
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            G.DrawRectangle(p1, x, y, width - 1, height - 1)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen)
            DrawBorders(p1, 0, 0, Width, Height)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal r As Rectangle)
            DrawBorders(p1, r.X, r.Y, r.Width, r.Height)
        End Sub
    
    #End Region
    
    #Region " DrawText Overloads "
    
        'TODO: Remove triple overloads?
    
        Private DrawTextPoint As Point
        Private DrawTextSize As Size
    
        Protected Sub DrawText(ByVal b1 As Brush, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            DrawText(b1, Text, a, x, y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal p1 As Point)
            DrawText(b1, Text, p1.X, p1.Y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal x As Integer, ByVal y As Integer)
            DrawText(b1, Text, x, y)
        End Sub
    
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            If text.Length = 0 Then Return
            DrawTextSize = Measure(text)
            DrawTextPoint = New Point(Width \ 2 - DrawTextSize.Width \ 2, MoveHeight \ 2 - DrawTextSize.Height \ 2)
    
            Select Case a
                Case HorizontalAlignment.Left
                    DrawText(b1, text, x, DrawTextPoint.Y + y)
                Case HorizontalAlignment.Center
                    DrawText(b1, text, DrawTextPoint.X + x, DrawTextPoint.Y + y)
                Case HorizontalAlignment.Right
                    DrawText(b1, text, Width - DrawTextSize.Width - x, DrawTextPoint.Y + y)
            End Select
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal p1 As Point)
            DrawText(b1, text, p1.X, p1.Y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal x As Integer, ByVal y As Integer)
            If text.Length = 0 Then Return
            G.DrawString(text, Font, b1, x, y)
        End Sub
    
    #End Region
    
    #Region " DrawImage Overloads "
    
        'TODO: Remove triple overloads?
    
        Private DrawImagePoint As Point
    
        Protected Sub DrawImage(ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            DrawImage(_Image, a, x, y)
        End Sub
        Protected Sub DrawImage(ByVal p1 As Point)
            DrawImage(_Image, p1.X, p1.Y)
        End Sub
        Protected Sub DrawImage(ByVal x As Integer, ByVal y As Integer)
            DrawImage(_Image, x, y)
        End Sub
    
        Protected Sub DrawImage(ByVal image As Image, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            If image Is Nothing Then Return
            DrawImagePoint = New Point(Width \ 2 - image.Width \ 2, MoveHeight \ 2 - image.Height \ 2)
    
            Select Case a
                Case HorizontalAlignment.Left
                    DrawImage(image, x, DrawImagePoint.Y + y)
                Case HorizontalAlignment.Center
                    DrawImage(image, DrawImagePoint.X + x, DrawImagePoint.Y + y)
                Case HorizontalAlignment.Right
                    DrawImage(image, Width - image.Width - x, DrawImagePoint.Y + y)
            End Select
        End Sub
        Protected Sub DrawImage(ByVal image As Image, ByVal p1 As Point)
            DrawImage(image, p1.X, p1.Y)
        End Sub
        Protected Sub DrawImage(ByVal image As Image, ByVal x As Integer, ByVal y As Integer)
            If image Is Nothing Then Return
            G.DrawImage(image, x, y, image.Width, image.Height)
        End Sub
    
    #End Region
    
    #Region " DrawGradient Overloads "
    
        'TODO: Remove triple overload?
    
        Private DrawGradientBrush As LinearGradientBrush
        Private DrawGradientRectangle As Rectangle
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            DrawGradient(blend, x, y, width, height, 90S)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            DrawGradient(c1, c2, x, y, width, height, 90S)
        End Sub
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
            DrawGradientRectangle = New Rectangle(x, y, width, height)
            DrawGradient(blend, DrawGradientRectangle, angle)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
            DrawGradientRectangle = New Rectangle(x, y, width, height)
            DrawGradient(c1, c2, DrawGradientRectangle, angle)
        End Sub
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal r As Rectangle, ByVal angle As Single)
            DrawGradientBrush = New LinearGradientBrush(r, Color.Empty, Color.Empty, angle)
            DrawGradientBrush.InterpolationColors = blend
            G.FillRectangle(DrawGradientBrush, r)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal r As Rectangle, ByVal angle As Single)
            DrawGradientBrush = New LinearGradientBrush(r, c1, c2, angle)
            G.FillRectangle(DrawGradientBrush, r)
        End Sub
    
    #End Region
    
    End Class
    
    MustInherit Class ThemeControl
        Inherits Control
    
        Protected G As Graphics, B As Bitmap
    
        Private _LockWidth As Integer
        Protected Sub LockWidth(ByVal lockWidth As Integer)
            _LockWidth = lockWidth
            If Not lockWidth = 0 AndAlso IsHandleCreated Then Width = lockWidth
        End Sub
    
        Private _LockHeight As Integer
        Protected Sub LockHeight(ByVal lockHeight As Integer)
            _LockHeight = lockHeight
            If Not lockHeight = 0 AndAlso IsHandleCreated Then Height = lockHeight
        End Sub
    
        Protected Overrides Sub SetBoundsCore(ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal specified As BoundsSpecified)
            If Not _LockWidth = 0 Then width = _LockWidth
            If Not _LockHeight = 0 Then height = _LockHeight
            MyBase.SetBoundsCore(x, y, width, height, specified)
        End Sub
    
        Sub New()
            SetStyle(DirectCast(139270, ControlStyles), True)
    
            _ImageSize = Size.Empty
    
            MeasureBitmap = New Bitmap(1, 1)
            MeasureGraphics = Graphics.FromImage(MeasureBitmap)
    
            InvalidateCustimization()
        End Sub
    
        Protected NotOverridable Overrides Sub OnSizeChanged(ByVal e As EventArgs)
            If _Transparent AndAlso Not (Width = 0 OrElse Height = 0) Then
                B = New Bitmap(Width, Height)
                G = Graphics.FromImage(B)
            End If
    
            Invalidate()
            MyBase.OnSizeChanged(e)
        End Sub
    
        Protected NotOverridable Overrides Sub OnPaint(ByVal e As PaintEventArgs)
            If Width = 0 OrElse Height = 0 Then Return
    
            If _Transparent Then
                PaintHook()
                e.Graphics.DrawImage(B, 0, 0)
            Else
                G = e.Graphics
                PaintHook()
            End If
        End Sub
    
        Protected Overrides Sub OnHandleCreated(ByVal e As EventArgs)
            InvalidateCustimization()
            ColorHook()
    
            If Not _LockWidth = 0 Then Width = _LockWidth
            If Not _LockHeight = 0 Then Height = _LockHeight
            If Not BackColorWait = Nothing Then BackColor = BackColorWait
            MyBase.OnHandleCreated(e)
        End Sub
    
    #Region " State Handling "
    
        Protected Overrides Sub OnMouseEnter(ByVal e As EventArgs)
            SetState(MouseState.Over)
            MyBase.OnMouseEnter(e)
        End Sub
    
        Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
            SetState(MouseState.Over)
            MyBase.OnMouseUp(e)
        End Sub
    
        Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
            If e.Button = Windows.Forms.MouseButtons.Left Then SetState(MouseState.Down)
            MyBase.OnMouseDown(e)
        End Sub
    
        Protected Overrides Sub OnMouseLeave(ByVal e As EventArgs)
            SetState(MouseState.None)
            MyBase.OnMouseLeave(e)
        End Sub
    
        Protected Overrides Sub OnEnabledChanged(ByVal e As EventArgs)
            If Enabled Then SetState(MouseState.None) Else SetState(MouseState.Block)
            MyBase.OnEnabledChanged(e)
        End Sub
    
        Protected State As MouseState
        Private Sub SetState(ByVal current As MouseState)
            State = current
            Invalidate()
        End Sub
    
    #End Region
    
    
    #Region " Property Overrides "
    
        Private BackColorWait As Color
        Overrides Property BackColor() As Color
            Get
                Return MyBase.BackColor
            End Get
            Set(ByVal value As Color)
                If IsHandleCreated Then
                    MyBase.BackColor = value
                Else
                    BackColorWait = value
                End If
            End Set
        End Property
    
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property ForeColor() As Color
            Get
            End Get
            Set(ByVal value As Color)
            End Set
        End Property
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property BackgroundImage() As Image
            Get
                Return Nothing
            End Get
            Set(ByVal value As Image)
            End Set
        End Property
        <Browsable(False), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Overrides Property BackgroundImageLayout() As ImageLayout
            Get
                Return Nothing
            End Get
            Set(ByVal value As ImageLayout)
            End Set
        End Property
    
        Overrides Property Text() As String
            Get
                Return MyBase.Text
            End Get
            Set(ByVal value As String)
                MyBase.Text = value
                Invalidate()
            End Set
        End Property
    
        Overrides Property Font() As Font
            Get
                Return MyBase.Font
            End Get
            Set(ByVal value As Font)
                MyBase.Font = value
                Invalidate()
            End Set
        End Property
    
    #End Region
    
    #Region " Properties "
    
        Private _NoRounding As Boolean
        Property NoRounding() As Boolean
            Get
                Return _NoRounding
            End Get
            Set(ByVal v As Boolean)
                _NoRounding = v
                Invalidate()
            End Set
        End Property
    
        Private _Image As Image
        Property Image() As Image
            Get
                Return _Image
            End Get
            Set(ByVal value As Image)
                If value Is Nothing Then
                    _ImageSize = Size.Empty
                Else
                    _ImageSize = value.Size
                End If
    
                _Image = value
                Invalidate()
            End Set
        End Property
    
        Private _ImageSize As Size
        ReadOnly Property ImageSize() As Size
            Get
                Return ImageSize
            End Get
        End Property
    
        Private _Transparent As Boolean
        Property Transparent() As Boolean
            Get
                Return _Transparent
            End Get
            Set(ByVal value As Boolean)
                If Not value AndAlso Not BackColor.A = 255 Then
                    Throw New Exception("Unable to change value to false while a transparent BackColor is in use.")
                End If
    
                SetStyle(ControlStyles.Opaque, Not value)
                SetStyle(ControlStyles.SupportsTransparentBackColor, value)
    
                If value Then InvalidateBitmap() Else B = Nothing
    
                _Transparent = value
                Invalidate()
            End Set
        End Property
    
        Private Items As New Dictionary(Of String, Color)
        <DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
        Property Colors() As Bloom()
            Get
                Dim T As New List(Of Bloom)
                Dim E As Dictionary(Of String, Color).Enumerator = Items.GetEnumerator
    
                While E.MoveNext
                    T.Add(New Bloom(E.Current.Key, E.Current.Value))
                End While
    
                Return T.ToArray
            End Get
            Set(ByVal value As Bloom())
                For Each B As Bloom In value
                    If Items.ContainsKey(B.Name) Then Items(B.Name) = B.Value
                Next
    
                InvalidateCustimization()
                ColorHook()
                Invalidate()
            End Set
        End Property
    
        Private _Custimization As String
        Property Custimization() As String
            Get
                Return _Custimization
            End Get
            Set(ByVal value As String)
                If value = _Custimization Then Return
    
                Dim Data As Byte()
                Dim Items As Bloom() = Colors
    
                Try
                    Data = Convert.FromBase64String(value)
                    For I As Integer = 0 To Items.Length - 1
                        Items(I).Value = Color.FromArgb(BitConverter.ToInt32(Data, I * 4))
                    Next
                Catch
                    Return
                End Try
    
                _Custimization = value
    
                Colors = Items
                ColorHook()
                Invalidate()
            End Set
        End Property
    
    #End Region
    
    #Region " Property Helpers "
    
        Private Sub InvalidateBitmap()
            If Width = 0 OrElse Height = 0 Then Return
            B = New Bitmap(Width, Height)
            G = Graphics.FromImage(B)
        End Sub
    
        Protected Function GetColor(ByVal name As String) As Color
            Return Items(name)
        End Function
    
        Protected Sub SetColor(ByVal name As String, ByVal color As Color)
            If Items.ContainsKey(name) Then Items(name) = color Else Items.Add(name, color)
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
            SetColor(name, Color.FromArgb(r, g, b))
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal a As Byte, ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
            SetColor(name, Color.FromArgb(a, r, g, b))
        End Sub
        Protected Sub SetColor(ByVal name As String, ByVal a As Byte, ByVal color As Color)
            SetColor(name, color.FromArgb(a, color))
        End Sub
    
        Private Sub InvalidateCustimization()
            Dim M As New MemoryStream(Items.Count * 4)
    
            For Each B As Bloom In Colors
                M.Write(BitConverter.GetBytes(B.Value.ToArgb), 0, 4)
            Next
    
            M.Close()
            _Custimization = Convert.ToBase64String(M.ToArray)
        End Sub
    
    #End Region
    
    
    #Region " User Hooks "
    
        Protected MustOverride Sub ColorHook()
        Protected MustOverride Sub PaintHook()
    
    #End Region
    
    
    #Region " Center Overloads "
    
        Private CenterReturn As Point
    
        Protected Function Center(ByVal r1 As Rectangle, ByVal s1 As Size) As Point
            CenterReturn = New Point((r1.Width \ 2 - s1.Width \ 2) + r1.X, (r1.Height \ 2 - s1.Height \ 2) + r1.Y)
            Return CenterReturn
        End Function
        Protected Function Center(ByVal r1 As Rectangle, ByVal r2 As Rectangle) As Point
            Return Center(r1, r2.Size)
        End Function
    
        Protected Function Center(ByVal w1 As Integer, ByVal h1 As Integer, ByVal w2 As Integer, ByVal h2 As Integer) As Point
            CenterReturn = New Point(w1 \ 2 - w2 \ 2, h1 \ 2 - h2 \ 2)
            Return CenterReturn
        End Function
    
        Protected Function Center(ByVal s1 As Size, ByVal s2 As Size) As Point
            Return Center(s1.Width, s1.Height, s2.Width, s2.Height)
        End Function
    
        Protected Function Center(ByVal r1 As Rectangle) As Point
            Return Center(ClientRectangle.Width, ClientRectangle.Height, r1.Width, r1.Height)
        End Function
        Protected Function Center(ByVal s1 As Size) As Point
            Return Center(Width, Height, s1.Width, s1.Height)
        End Function
        Protected Function Center(ByVal w1 As Integer, ByVal h1 As Integer) As Point
            Return Center(Width, Height, w1, h1)
        End Function
    
    #End Region
    
    #Region " Measure Overloads "
    
        Private MeasureBitmap As Bitmap
        Private MeasureGraphics As Graphics
    
        Protected Function Measure(ByVal text As String) As Size
            Return MeasureGraphics.MeasureString(text, Font, Width).ToSize
        End Function
        Protected Function Measure() As Size
            Return MeasureGraphics.MeasureString(Text, Font, Width).ToSize
        End Function
    
    #End Region
    
    #Region " DrawCorners Overloads "
    
        'TODO: Optimize by checking brush color
    
        Private DrawCornersBrush As SolidBrush
    
        Protected Sub DrawCorners(ByVal c1 As Color)
            DrawCorners(c1, 0, 0, Width, Height)
        End Sub
        Protected Sub DrawCorners(ByVal c1 As Color, ByVal r1 As Rectangle)
            DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height)
        End Sub
        Protected Sub DrawCorners(ByVal c1 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            If _NoRounding Then Return
    
            If _Transparent Then
                B.SetPixel(x, y, c1)
                B.SetPixel(x + (width - 1), y, c1)
                B.SetPixel(x, y + (height - 1), c1)
                B.SetPixel(x + (width - 1), y + (height - 1), c1)
            Else
                DrawCornersBrush = New SolidBrush(c1)
                G.FillRectangle(DrawCornersBrush, x, y, 1, 1)
                G.FillRectangle(DrawCornersBrush, x + (width - 1), y, 1, 1)
                G.FillRectangle(DrawCornersBrush, x, y + (height - 1), 1, 1)
                G.FillRectangle(DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1)
            End If
        End Sub
    
    #End Region
    
    #Region " DrawBorders Overloads "
    
        'TODO: Remove triple overload?
    
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal offset As Integer)
            DrawBorders(p1, x + offset, y + offset, width - (offset * 2), height - (offset * 2))
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal offset As Integer)
            DrawBorders(p1, 0, 0, Width, Height, offset)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal r As Rectangle, ByVal offset As Integer)
            DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset)
        End Sub
    
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            G.DrawRectangle(p1, x, y, width - 1, height - 1)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen)
            DrawBorders(p1, 0, 0, Width, Height)
        End Sub
        Protected Sub DrawBorders(ByVal p1 As Pen, ByVal r As Rectangle)
            DrawBorders(p1, r.X, r.Y, r.Width, r.Height)
        End Sub
    
    #End Region
    
    #Region " DrawText Overloads "
    
        'TODO: Remove triple overloads?
    
        Private DrawTextPoint As Point
        Private DrawTextSize As Size
    
        Protected Sub DrawText(ByVal b1 As Brush, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            DrawText(b1, Text, a, x, y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal p1 As Point)
            DrawText(b1, Text, p1.X, p1.Y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal x As Integer, ByVal y As Integer)
            DrawText(b1, Text, x, y)
        End Sub
    
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            If text.Length = 0 Then Return
            DrawTextSize = Measure(text)
            DrawTextPoint = Center(DrawTextSize)
    
            Select Case a
                Case HorizontalAlignment.Left
                    DrawText(b1, text, x, DrawTextPoint.Y + y)
                Case HorizontalAlignment.Center
                    DrawText(b1, text, DrawTextPoint.X + x, DrawTextPoint.Y + y)
                Case HorizontalAlignment.Right
                    DrawText(b1, text, Width - DrawTextSize.Width - x, DrawTextPoint.Y + y)
            End Select
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal p1 As Point)
            DrawText(b1, text, p1.X, p1.Y)
        End Sub
        Protected Sub DrawText(ByVal b1 As Brush, ByVal text As String, ByVal x As Integer, ByVal y As Integer)
            If text.Length = 0 Then Return
            G.DrawString(text, Font, b1, x, y)
        End Sub
    
    #End Region
    
    #Region " DrawImage Overloads "
    
        'TODO: Remove triple overloads?
    
        Private DrawImagePoint As Point
    
        Protected Sub DrawImage(ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            DrawImage(_Image, a, x, y)
        End Sub
        Protected Sub DrawImage(ByVal p1 As Point)
            DrawImage(_Image, p1.X, p1.Y)
        End Sub
        Protected Sub DrawImage(ByVal x As Integer, ByVal y As Integer)
            DrawImage(_Image, x, y)
        End Sub
    
        Protected Sub DrawImage(ByVal image As Image, ByVal a As HorizontalAlignment, ByVal x As Integer, ByVal y As Integer)
            If image Is Nothing Then Return
            DrawImagePoint = Center(image.Size)
    
            Select Case a
                Case HorizontalAlignment.Left
                    DrawImage(image, x, DrawImagePoint.Y + y)
                Case HorizontalAlignment.Center
                    DrawImage(image, DrawImagePoint.X + x, DrawImagePoint.Y + y)
                Case HorizontalAlignment.Right
                    DrawImage(image, Width - image.Width - x, DrawImagePoint.Y + y)
            End Select
        End Sub
        Protected Sub DrawImage(ByVal image As Image, ByVal p1 As Point)
            DrawImage(image, p1.X, p1.Y)
        End Sub
        Protected Sub DrawImage(ByVal image As Image, ByVal x As Integer, ByVal y As Integer)
            If image Is Nothing Then Return
            G.DrawImage(image, x, y, image.Width, image.Height)
        End Sub
    
    #End Region
    
    #Region " DrawGradient Overloads "
    
        'TODO: Remove triple overload?
    
        Private DrawGradientBrush As LinearGradientBrush
        Private DrawGradientRectangle As Rectangle
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            DrawGradient(blend, x, y, width, height, 90S)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
            DrawGradient(c1, c2, x, y, width, height, 90S)
        End Sub
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
            DrawGradientRectangle = New Rectangle(x, y, width, height)
            DrawGradient(blend, DrawGradientRectangle, angle)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal angle As Single)
            DrawGradientRectangle = New Rectangle(x, y, width, height)
            DrawGradient(c1, c2, DrawGradientRectangle, angle)
        End Sub
    
        Protected Sub DrawGradient(ByVal blend As ColorBlend, ByVal r As Rectangle, ByVal angle As Single)
            DrawGradientBrush = New LinearGradientBrush(r, Color.Empty, Color.Empty, angle)
            DrawGradientBrush.InterpolationColors = blend
            G.FillRectangle(DrawGradientBrush, r)
        End Sub
        Protected Sub DrawGradient(ByVal c1 As Color, ByVal c2 As Color, ByVal r As Rectangle, ByVal angle As Single)
            DrawGradientBrush = New LinearGradientBrush(r, c1, c2, angle)
            G.FillRectangle(DrawGradientBrush, r)
        End Sub
    
    #End Region
    
    End Class

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  2. The Following 3 Users Say Thank You to cosconub For This Useful Post:

    cgallagher21 (08-13-2011),ChikenTawk (08-13-2011),markO1O8 (08-12-2011)

  3. #2
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,627
    Reputation
    11
    Thanks
    325
    My Mood
    Angelic
    Nice Theme !

  4. #3
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed
    Good Jawb

  5. #4
    Fly3r's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Not telling.
    Posts
    720
    Reputation
    18
    Thanks
    265
    My Mood
    Paranoid
    Nice theme.. but i want to ask something.. i know these are made in PS [ most of the time] but how to make the theme in Code so that u can put it in the apps?
    Joined MPGH: 07/08/09


    i used to tell arrow to the knee jokes then i died due to blood loss from takeing tomany arrows to the knee at once
    A network problem caused by you? What did you do? Trip over the cable?




  6. #5
    hustelboy's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Underground Cave System Posts: 4,435,765
    Posts
    312
    Reputation
    28
    Thanks
    39
    It's the same Aeonhack made. You just changed the colors -.-

  7. #6
    Dreamer's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Seattle
    Posts
    8,745
    Reputation
    393
    Thanks
    1,481
    My Mood
    Bitchy
    Doesnt look like MPGh. But nice job!
    Resource Team: Feb/5/2012 - May/5/2012
    Middleman: April/25/2012 - September/16/12


  8. #7
    FUKO's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    PBlackout.exe /mhu
    Posts
    11,128
    Reputation
    1103
    Thanks
    3,860
    Not to be rude, but this looks horrible....

  9. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Jamal View Post
    Not to be rude, but this looks horrible....
    Completely unnecessary comment, it's not like your theme is exactly anyone's idea of eyecandy.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  10. #9
    Sync's Avatar
    Join Date
    Jul 2011
    Gender
    female
    Location
    Bat Gang
    Posts
    1,977
    Reputation
    239
    Thanks
    208
    My Mood
    Yeehaw
    Looks

  11. #10
    iZ3RO's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    191
    Reputation
    32
    Thanks
    536
    My Mood
    Stressed
    Loving the re-color Immortal! My only suggestion is to lighten the blue you used a bit.
    Try something that you used for the very top bar of the theme. It looks a bit to contrasting when used otherwise. Other than that, amazing job!
    (btw, it is xZ3ROxPROJ3CTx from HF)

    ~ZerO
    [IMG]https://iforum.*****.net/sig/1.png[/IMG]
    [IMG]https://iforum.*****.net/sig/2.png[/IMG]
    [IMG]https://iforum.*****.net/sig/3.png[/IMG]
    [IMG]https://iforum.*****.net/sig/4.png[/IMG][IMG]https://iforum.*****.net/sig/5.png[/IMG]
    [IMG]https://iforum.*****.net/sig/6.png[/IMG]
    [IMG]https://iforum.*****.net/sig/7.png[/IMG][IMG]https://iforum.*****.net/sig/8.png[/IMG]
    [IMG]https://iforum.*****.net/sig/9.png[/IMG][IMG]https://iforum.*****.net/sig/11.png[/IMG]
    [IMG]https://iforum.*****.net/sig/12.png[/IMG]

  12. #11
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    oh hi zero this wasn't thx for the tips

    and no i did not steal aeonhacks theme you can contact him on msn im good friends with him.

    Thank god jamal received ban hamma

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

Similar Threads

  1. Ps3 mpgh theme dem106.
    By dem106 in forum Playstation Hacking
    Replies: 17
    Last Post: 10-28-2013, 03:34 AM
  2. [Release] [XTCject] - Unique MPGH themed .dll Injector
    By -XpliCitt- in forum Combat Arms Hacks & Cheats
    Replies: 38
    Last Post: 03-12-2010, 06:26 PM
  3. [Re-Release] MPGH themed I.P Changer
    By -XpliCitt- in forum Combat Arms Hacks & Cheats
    Replies: 169
    Last Post: 01-19-2010, 05:06 PM
  4. MPGH Themed Launcher
    By mutantcookie in forum Combat Arms Mods & Rez Modding
    Replies: 10
    Last Post: 12-20-2009, 12:54 PM
  5. [REQUEST] MPGH Themed Images?
    By Grim in forum General
    Replies: 15
    Last Post: 11-19-2009, 06:34 PM