Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '----------------------------------------------------|
- ' |
- ' Design & Coder : KingDom - الممَلكة . |
- ' Site : Dev-Point.Com . |
- ' Contact With me on Skype : KingDomSc . |
- ' |
- '----------------------------------------------------|
- Class cForm
- Inherits ThemeContainer154
- Sub New()
- BackColor = Color.White
- SetColor("FirstColor", Color.FromArgb(227, 227, 227))
- SetColor("TextColor", Color.FromArgb(75, 75, 75))
- SetColor("BorderColor", Color.FromArgb(75, 75, 75))
- SetColor("TopColor", Color.FromArgb(237, 237, 237))
- End Sub
- Dim FirstColor As Color
- Dim BorderColor As Color
- Dim TextColor As Color
- Dim TopColor As Color
- Protected Overrides Sub ColorHook()
- FirstColor = GetColor("FirstColor")
- BorderColor = GetColor("BorderColor")
- TextColor = GetColor("TextColor")
- TopColor = GetColor("TopColor")
- End Sub
- Protected Overrides Sub PaintHook()
- G.Clear(BackColor)
- G.FillRectangle(New SolidBrush(BackColor), New Rectangle(0, 0, Width, Height))
- Dim TopG As New LinearGradientBrush(New Rectangle(0, 0, Width - 1, 50), TopColor, Color.White, 90)
- G.FillRectangle(TopG, New Rectangle(0, 0, Width - 1, 30))
- G.DrawString(FindForm.Text, New Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.Pixel), New SolidBrush(Color.White), New Point(43, 19))
- G.DrawString(FindForm.Text, New Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.Pixel), New SolidBrush(TextColor), New Point(42, 18))
- G.DrawIcon(FindForm.Icon, New Rectangle(10, 10, 30, 30))
- G.DrawRectangle(New Pen(BorderColor), New Rectangle(0, 0, Width - 1, Height - 1))
- End Sub
- End Class
- Class cLabel
- Inherits ThemeControl154
- Dim TextColor As Color
- Sub New()
- SetColor("Text", Color.Black)
- End Sub
- Protected Overrides Sub ColorHook()
- TextColor = GetColor("Text")
- End Sub
- Protected Overrides Sub PaintHook()
- G.Clear(Color.White)
- Dim FormatString As New StringFormat()
- FormatString.LineAlignment = StringAlignment.Center
- FormatString.Alignment = StringAlignment.Center
- G.DrawString(Text, New Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.Pixel), New SolidBrush(Color.FromArgb(130, 130, 130)), New Rectangle(0, 0, Width - 1, Height - 1), FormatString)
- G.FillRectangle(New SolidBrush(Color.FromArgb(73, 138, 242)), New Rectangle(0, 0, 1, Height - 1))
- End Sub
- End Class
- Class cButton
- Inherits ThemeControl154
- Sub New()
- SetColor("ColorTop", Color.FromArgb(77, 143, 253))
- SetColor("ColorBottom", Color.FromArgb(71, 135, 237))
- SetColor("TextColor", Color.Black)
- FormatString.Alignment = StringAlignment.Center
- FormatString.LineAlignment = StringAlignment.Center
- End Sub
- Dim ColorTop As Color
- Dim ColorBottom As Color
- Dim TextColor As Color
- Protected Overrides Sub ColorHook()
- ColorTop = GetColor("ColorTop")
- ColorBottom = GetColor("ColorBottom")
- TextColor = GetColor("TextColor")
- End Sub
- Dim FormatString As New StringFormat()
- Protected Overrides Sub PaintHook()
- G.Clear(BackColor)
- Cursor = Cursors.Hand
- Select Case State
- Case MouseState.None
- Dim LG As New LinearGradientBrush(New Rectangle(0, 0, Width - 1, Height - 1), ColorTop, ColorBottom, 90)
- G.FillRectangle(LG, New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawRectangle(New Pen(Color.FromArgb(48, 121, 237)), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString(Text, New Font("arial", 13, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Color.White), New Rectangle(0, 2, Width - 1, Height - 1), FormatString)
- Case MouseState.Over
- Dim LG As New LinearGradientBrush(New Rectangle(0, 0, Width - 1, Height - 1), ColorTop, Color.FromArgb(53, 122, 232), 90)
- G.FillRectangle(LG, New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawRectangle(New Pen(Color.FromArgb(47, 91, 183)), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString(Text, New Font("arial", 13, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Color.White), New Rectangle(0, 2, Width - 1, Height - 1), FormatString)
- Case MouseState.Down
- Dim LG As New LinearGradientBrush(New Rectangle(0, 0, Width - 1, Height - 1), ColorTop, Color.FromArgb(53, 122, 232), 90)
- G.FillRectangle(LG, New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawRectangle(New Pen(Color.FromArgb(47, 91, 183)), New Rectangle(0, 0, Width - 1, Height - 1))
- G.FillRectangle(New SolidBrush(Color.FromArgb(61, 115, 203)), New Rectangle(0, 0, Width, 3))
- G.FillRectangle(New SolidBrush(Color.FromArgb(61, 115, 203)), New Rectangle(0, 0, 3, Height))
- G.FillRectangle(New SolidBrush(Color.FromArgb(61, 115, 203)), New Rectangle(Width - 3, 0, 3, Height))
- G.DrawString(Text, New Font("arial", 13, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Color.White), New Rectangle(0, 2, Width - 1, Height - 1), FormatString)
- End Select
- End Sub
- End Class
- Class cMiniButton
- Inherits ThemeControl154
- Sub New()
- SetColor("TextColor", Color.FromArgb(128, 128, 128))
- SetColor("BackColor1", Color.FromArgb(227, 227, 227))
- SetColor("BorderColor", Color.FromArgb(179, 179, 179))
- End Sub
- Dim Textcolor As Color
- Dim Backcolor1 As Color
- Dim Bordercolor As Color
- Dim FormatString As New StringFormat()
- Protected Overrides Sub ColorHook()
- Textcolor = GetColor("TextColor")
- Backcolor1 = GetColor("BackColor1")
- Bordercolor = GetColor("BorderColor")
- FormatString.LineAlignment = StringAlignment.Center
- FormatString.Alignment = StringAlignment.Center
- End Sub
- Protected Overrides Sub PaintHook()
- Cursor = Cursors.Hand
- G.Clear(Backcolor1)
- Width = 23
- Height = 15
- Select Case State
- Case MouseState.None
- G.FillRectangle(New SolidBrush(Backcolor1), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("-", New Font("Tahoma", 15, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Textcolor), New Rectangle(0, 1, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- Case MouseState.Over
- G.FillRectangle(New SolidBrush(Textcolor), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("-", New Font("Tahoma", 15, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Backcolor1), New Rectangle(0, 1, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- Case MouseState.Down
- G.FillRectangle(New SolidBrush(Backcolor1), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("-", New Font("Tahoma", 15, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Textcolor), New Rectangle(0, 1, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- FindForm.WindowState = FormWindowState.Minimized
- End Select
- End Sub
- End Class
- Class cMaxButton
- Inherits ThemeControl154
- Sub New()
- SetColor("TextColor", Color.FromArgb(128, 128, 128))
- SetColor("BackColor1", Color.FromArgb(227, 227, 227))
- SetColor("BorderColor", Color.FromArgb(179, 179, 179))
- End Sub
- Dim Textcolor As Color
- Dim Backcolor1 As Color
- Dim Bordercolor As Color
- Dim FormatString As New StringFormat()
- Protected Overrides Sub ColorHook()
- Textcolor = GetColor("TextColor")
- Backcolor1 = GetColor("BackColor1")
- Bordercolor = GetColor("BorderColor")
- FormatString.LineAlignment = StringAlignment.Center
- FormatString.Alignment = StringAlignment.Center
- End Sub
- Protected Overrides Sub PaintHook()
- Cursor = Cursors.Hand
- G.Clear(Backcolor1)
- Width = 23
- Height = 15
- Select Case State
- Case MouseState.None
- G.FillRectangle(New SolidBrush(Backcolor1), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("x", New Font("Tahoma", 11, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Textcolor), New Rectangle(0, 0, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- Case MouseState.Over
- G.FillRectangle(New SolidBrush(Textcolor), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("x", New Font("Tahoma", 11, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Backcolor1), New Rectangle(0, 0, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- Case MouseState.Down
- G.FillRectangle(New SolidBrush(Backcolor1), New Rectangle(0, 0, Width - 1, Height - 1))
- G.DrawString("x", New Font("Tahoma", 11, FontStyle.Bold, GraphicsUnit.World), New SolidBrush(Textcolor), New Rectangle(0, 0, Width - 1, Height - 1), FormatString)
- G.DrawRectangle(New Pen(Bordercolor), New Rectangle(0, 0, Width - 1, Height - 1))
- End
- End Select
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment