Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
Imports System.Drawing.Drawing2D Imports Pavelite_Theme.PaveliteFormPallete Public Class PL_FormContainer Inherits ContainerControl Sub New() Me.DoubleBuffered = True 'Me.Dock = true End Sub #Region "Properties" '{ '[Drawing] '} Property Quality As gs = gs.AA Dim w As Integer = Me.Width Dim h As Integer = Me.Height '} '[Msic] '} '-Text Property fText As Font = New Font("Arial", 9, FontStyle.Bold) Property hText As String = "PAVELITE FORM" '-Icon Property bIcon As Boolean = False Property Icon As Image '-Buttons Property Buttons As Boolean = True #End Region #Region "Functions" Public Shared Function CheckIcon(b As Boolean, y As Integer, n As Integer) As Integer If b Then Return y : Else Return n End Function Enum gs AA HQ HS End Enum Public Shared Function GetSmoothMode(g As gs) As SmoothingMode Select Case g Case gs.AA Return SmoothingMode.AntiAlias Case gs.HQ Return SmoothingMode.HighQuality Case gs.HS Return SmoothingMode.HighSpeed End Select Return SmoothingMode.HighSpeed End Function Public Shared Function LinearGradientBrush(fc As Color, sc As Color, r As Rectangle, a As Decimal) As LinearGradientBrush Return New LinearGradientBrush(r, fc, sc, a) End Function #End Region Public Sub PL_FormContainer_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint Using bm As New Bitmap(Me.Width, Me.Height) Using g As Graphics = Graphics.FromImage(bm) '[Begin] g.SmoothingMode = GetSmoothMode(Quality) w = Me.Width - 1 h = Me.Height - 1 '[Back] g.Clear(_BackColor) '[Header] g.FillRectangle(New LinearGradientBrush(New Rectangle(1, 1, w - 1, 50), _HeaderColor, _AltHeaderColor, 90.0!), New Rectangle(1, 1, w - 1, 50)) '[Icon] If bIcon Then g.FillRectangle(BackBrush, New Rectangle(6, (50 / 2) - 13, 26, 26)) g.DrawRectangle(BorderPen, New Rectangle(6, (50 / 2) - 13, 26, 26)) Try : If Not Icon Is Nothing Then : g.DrawImage(Icon, New Rectangle(7, (50 / 2) - 12, 25, 25)) : Else : End If : Catch ex As Exception : End Try Icon.Dispose() End If '[Text] g.DrawString(hText, fText, AltTextBrush, New Rectangle((CheckIcon(bIcon, 35, 11)), 1, w - (CheckIcon(bIcon, 35, 11)), 53), New StringFormat With {.Alignment = StringAlignment.Near, .LineAlignment = StringAlignment.Center}) g.DrawString(hText, fText, TextBrush, New Rectangle((CheckIcon(bIcon, 35, 11)), 1, w - (CheckIcon(bIcon, 35, 11)), 50), New StringFormat With {.Alignment = StringAlignment.Near, .LineAlignment = StringAlignment.Center}) '[Border] g.DrawRectangle(BorderPen, New Rectangle(0, 0, w, h)) '[Button] If Buttons Then g.FillRectangle(New SolidBrush(Color.FromArgb(104, 155, 192)), New Rectangle(w - 70, (50 / 3) - 12, 27, 18)) g.FillRectangle(New SolidBrush(Color.FromArgb(68, 114, 150)), New Rectangle(w - 70, (50 / 3) - 13, 26, 16)) g.FillRectangle(New SolidBrush(Color.FromArgb(47, 104, 149)), New Rectangle(w - 70, (50 / 3) - 12, 26, 17)) g.FillRectangle(New SolidBrush(Color.FromArgb(51, 114, 163)), New Rectangle(w - 70, (50 / 3) - 11, 26, 16)) g.DrawString("-", New Font("Arial", 10, FontStyle.Regular), New SolidBrush(Color.FromArgb(105, 152, 188)), New Rectangle(w - 74, (55 / 3) - 11, 26, 16), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) g.DrawString("-", New Font("Arial", 10, FontStyle.Regular), Brushes.White, New Rectangle(w - 73, (55 / 3) - 11, 26, 16), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) g.FillRectangle(New LinearGradientBrush(New Rectangle(w - 53, 2, 10, 48), _HeaderColor, _AltHeaderColor, 90.0!), New Rectangle(w - 53, 2, 10, 48)) g.FillRectangle(New SolidBrush(Color.FromArgb(104, 155, 192)), New Rectangle(w - 50, (50 / 3) - 12, 27, 18)) g.FillRectangle(New SolidBrush(Color.FromArgb(68, 114, 150)), New Rectangle(w - 50, (50 / 3) - 13, 26, 16)) g.FillRectangle(New SolidBrush(Color.FromArgb(47, 104, 149)), New Rectangle(w - 50, (50 / 3) - 12, 26, 17)) g.FillRectangle(New SolidBrush(Color.FromArgb(51, 114, 163)), New Rectangle(w - 50, (50 / 3) - 11, 26, 16)) g.DrawString("+", New Font("Arial", 10, FontStyle.Regular), New SolidBrush(Color.FromArgb(105, 152, 188)), New Rectangle(w - 52, (55 / 3) - 11, 26, 16), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) g.DrawString("+", New Font("Arial", 10, FontStyle.Regular), Brushes.White, New Rectangle(w - 53, (55 / 3) - 11, 26, 16), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) g.FillRectangle(New LinearGradientBrush(New Rectangle(w - 33, 2, 10, 48), _HeaderColor, _AltHeaderColor, 90.0!), New Rectangle(w - 33, 3, 10, 47)) g.FillRectangle(New SolidBrush(Color.FromArgb(104, 155, 192)), New Rectangle(w - 30, (50 / 3) - 12, 27, 18)) g.FillRectangle(New SolidBrush(Color.FromArgb(68, 114, 150)), New Rectangle(w - 30, (50 / 3) - 13, 26, 16)) g.FillRectangle(New SolidBrush(Color.FromArgb(47, 104, 149)), New Rectangle(w - 30, (50 / 3) - 12, 26, 17)) g.FillRectangle(New SolidBrush(Color.FromArgb(51, 114, 163)), New Rectangle(w - 30, (50 / 3) - 11, 26, 16)) g.DrawString("x", New Font("Arial", 10, FontStyle.Regular), New SolidBrush(Color.FromArgb(105, 152, 188)), New Rectangle(w - 29, (50 / 3) - 11, 26, 14), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) g.DrawString("x", New Font("Arial", 10, FontStyle.Regular), Brushes.White, New Rectangle(w - 30, (50 / 3) - 11, 26, 14), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center}) ' g.FillRectangle(New SolidBrush(Color.FromArgb(96, 158, 196)), New Rectangle(w - 29, (50 / 3) - 12, 24, 16)) End If 'g.FillEllipse(New SolidBrush(Color.FromArgb(104, 155, 192)), New Rectangle(w - 30, (50 / 3) - 12, 27, 18)) 'g.FillEllipse(New SolidBrush(Color.FromArgb(68, 114, 150)), New Rectangle(w - 30, (50 / 3) - 13, 26, 16)) 'g.FillEllipse(New SolidBrush(Color.FromArgb(47, 104, 149)), New Rectangle(w - 30, (50 / 3) - 12, 26, 17)) 'g.FillEllipse(New SolidBrush(Color.FromArgb(51, 114, 163)), New Rectangle(w - 30, (50 / 3) - 11, 26, 16)) ' g.FillRectangle(New SolidBrush(Color.FromArgb(96, 158, 196)), New Rectangle(w - 29, (50 / 3) - 12, 24, 16)) '[End] Try : e.Graphics.DrawImage(DirectCast(bm.Clone(), Bitmap), 0, 0) : Catch ex As Exception : End Try End Using End Using End Sub End Class Public NotInheritable Class PaveliteFormPallete #Region " Properties " Public Shared ReadOnly Property BorderPen() As Pen Get Return _BorderPen End Get End Property Public Shared ReadOnly Property BackBrush() As SolidBrush Get Return _BackBrush End Get End Property Public Shared ReadOnly Property HeaderBrush() As SolidBrush Get Return _HeaderBrush End Get End Property Public Shared ReadOnly Property AltHeaderBrush() As SolidBrush Get Return _AltHeaderBrush End Get End Property Public Shared ReadOnly Property IconBackBrush() As SolidBrush Get Return _IconBackBrush End Get End Property Public Shared ReadOnly Property IconBorderBrush() As SolidBrush Get Return _IconBorderBrush End Get End Property Public Shared ReadOnly Property TextBrush() As SolidBrush Get Return _TextBrush End Get End Property Public Shared ReadOnly Property AltTextBrush() As SolidBrush Get Return _AltTextBrush End Get End Property #End Region #Region " Members " Private Shared _BorderPen As Pen Private Shared _BackBrush As SolidBrush Private Shared _HeaderBrush As SolidBrush Private Shared _AltHeaderBrush As SolidBrush Private Shared _IconBackBrush As SolidBrush Private Shared _IconBorderBrush As SolidBrush Private Shared _TextBrush As SolidBrush Private Shared _AltTextBrush As SolidBrush '<Color> Public Shared Property _BorderColor As Color = Color.FromArgb(212, 232, 244) Public Shared Property _BackColor As Color = Color.FromArgb(244, 249, 252) Public Shared Property _HeaderColor As Color = Color.FromArgb(113, 171, 204) Public Shared Property _AltHeaderColor As Color = Color.FromArgb(63, 127, 173) Public Shared Property _IconBackColor As Color = Color.FromArgb(244, 249, 252) Public Shared Property _IconBorderColor As Color = Color.FromArgb(212, 232, 244) Public Shared Property _TextColor As Color = Color.FromArgb(242, 246, 249) Public Shared Property _AltTextColor As Color = Color.FromArgb(48, 108, 157) #End Region #Region " Constructor " Shared Sub New() _BorderPen = New Pen(_BorderColor) _BackBrush = New SolidBrush(_BackColor) _HeaderBrush = New SolidBrush(_HeaderColor) _AltHeaderBrush = New SolidBrush(_AltHeaderColor) _IconBackBrush = New SolidBrush(_IconBackColor) _IconBorderBrush = New SolidBrush(_IconBorderColor) _TextBrush = New SolidBrush(_TextColor) _AltTextBrush = New SolidBrush(_AltTextColor) End Sub #End Region End Class
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Untitled
1 hour ago | 12.49 KB
Untitled
3 hours ago | 12.40 KB
programacion_algoritmos_flashcards.tsv
5 hours ago | 2.67 KB
Untitled
5 hours ago | 17.13 KB
Untitled
7 hours ago | 18.40 KB
Untitled
9 hours ago | 17.70 KB
Untitled
11 hours ago | 16.97 KB
Untitled
13 hours ago | 21.75 KB
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!