Click here to Skip to main content
15,896,153 members
Articles / Desktop Programming / Windows Forms

Shape Control for .NET

Rate me:
Please Sign up or sign in to vote.
4.84/5 (170 votes)
23 Mar 2017CPOL10 min read 381.7K   21.7K   301  
Implementing shape control that supports transparency, custom design-time editors and simple animation
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Reflection

''' <summary>
''' Summary description for Form1.
''' </summary>
Public Class Form1
	Inherits System.Windows.Forms.Form
    Private WithEvents shapeControl1 As ShapeControl.CustomControl1
	''' <summary>
	''' Required designer variable.
	''' </summary>
	Private components As System.ComponentModel.Container = Nothing
	Private panel1 As System.Windows.Forms.Panel
	Private bm As Bitmap
	Private sx As Integer, sy As Integer
	' private Region tempregion;
    Private WithEvents shapeControl3 As ShapeControl.CustomControl1
    Private WithEvents shapeControl4 As ShapeControl.CustomControl1
	Private shapeControl5 As ShapeControl.CustomControl1
	Private shapeControl7 As ShapeControl.CustomControl1
	Private shapeControl6 As ShapeControl.CustomControl1
	Private customControl11 As ShapeControl.CustomControl1
	Private customControl12 As ShapeControl.CustomControl1
	Private customControl13 As ShapeControl.CustomControl1
	Private customControl14 As ShapeControl.CustomControl1
	Private customControl15 As ShapeControl.CustomControl1
	Private customControl16 As ShapeControl.CustomControl1
	Private customControl17 As ShapeControl.CustomControl1
	Private customControl18 As ShapeControl.CustomControl1
	Private customControl19 As ShapeControl.CustomControl1
	Private customControl110 As ShapeControl.CustomControl1
	Private customControl111 As ShapeControl.CustomControl1
	Private customControl112 As ShapeControl.CustomControl1
	Private customControl113 As ShapeControl.CustomControl1
	Private shapeControl2 As ShapeControl.CustomControl1


	Public Sub New()

		'
		' Required for Windows Form Designer support
		'
		InitializeComponent()

		'
		' TODO: Add any constructor code after InitializeComponent call
		'
		bm = New Bitmap(Me.panel1.Width, Me.panel1.Height)
		Dim g As Graphics = System.Drawing.Graphics.FromImage(bm)
		g.FillRectangle(Brushes.LightBlue, New Rectangle(0, 0, Me.panel1.Width, Me.panel1.Height))
		Dim sf As New StringFormat()
		sf.Alignment = StringAlignment.Center
		sf.LineAlignment = StringAlignment.Center
		g.DrawString("THIS IS THE TEST BACKGROUND", New Font("Arial", 18, FontStyle.Bold), Brushes.Brown, New Rectangle(New Point(0, 0), New Size(Me.panel1.Width, Me.panel1.Height)), sf)

		Me.panel1.BackgroundImage = bm
	End Sub

	''' <summary>
	''' Clean up any resources being used.
	''' </summary>
	Protected Overrides Sub Dispose(disposing As Boolean)
		If disposing Then
			If components IsNot Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(disposing)
	End Sub

	#Region "Windows Form Designer generated code"
	''' <summary>
	''' Required method for Designer support - do not modify
	''' the contents of this method with the code editor.
	''' </summary>
	Private Sub InitializeComponent()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
        Me.panel1 = New System.Windows.Forms.Panel
        Me.customControl113 = New ShapeControl.CustomControl1
        Me.shapeControl6 = New ShapeControl.CustomControl1
        Me.customControl112 = New ShapeControl.CustomControl1
        Me.customControl111 = New ShapeControl.CustomControl1
        Me.customControl110 = New ShapeControl.CustomControl1
        Me.customControl19 = New ShapeControl.CustomControl1
        Me.customControl18 = New ShapeControl.CustomControl1
        Me.customControl17 = New ShapeControl.CustomControl1
        Me.customControl16 = New ShapeControl.CustomControl1
        Me.customControl15 = New ShapeControl.CustomControl1
        Me.customControl14 = New ShapeControl.CustomControl1
        Me.customControl13 = New ShapeControl.CustomControl1
        Me.customControl12 = New ShapeControl.CustomControl1
        Me.customControl11 = New ShapeControl.CustomControl1
        Me.shapeControl5 = New ShapeControl.CustomControl1
        Me.shapeControl7 = New ShapeControl.CustomControl1
        Me.shapeControl4 = New ShapeControl.CustomControl1
        Me.shapeControl3 = New ShapeControl.CustomControl1
        Me.shapeControl2 = New ShapeControl.CustomControl1
        Me.shapeControl1 = New ShapeControl.CustomControl1
        Me.panel1.SuspendLayout()
        Me.SuspendLayout()
        '
        'panel1
        '
        Me.panel1.Controls.Add(Me.shapeControl1)
        Me.panel1.Location = New System.Drawing.Point(8, 16)
        Me.panel1.Name = "panel1"
        Me.panel1.Size = New System.Drawing.Size(245, 314)
        Me.panel1.TabIndex = 2
        '
        'customControl113
        '
        Me.customControl113.AnimateBorder = False
        Me.customControl113.BackColor = System.Drawing.Color.FromArgb(CType(CType(175, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(225, Byte), Integer))
        Me.customControl113.Blink = False
        Me.customControl113.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl113.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl113.BorderWidth = 0
        Me.customControl113.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl113.Connector = ShapeControl.ConnecterType.Center
        Me.customControl113.Direction = ShapeControl.LineDirection.None
        Me.customControl113.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl113.Location = New System.Drawing.Point(747, 218)
        Me.customControl113.Name = "customControl113"
        Me.customControl113.Shape = ShapeControl.ShapeType.Rectangle
        Me.customControl113.ShapeImage = CType(resources.GetObject("customControl113.ShapeImage"), System.Drawing.Image)
        Me.customControl113.Size = New System.Drawing.Size(56, 58)
        Me.customControl113.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl113.TabIndex = 21
        Me.customControl113.Tag2 = ""
        Me.customControl113.UseGradient = False
        Me.customControl113.Vibrate = False
        '
        'shapeControl6
        '
        Me.shapeControl6.AnimateBorder = False
        Me.shapeControl6.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(221, Byte), Integer), CType(CType(152, Byte), Integer), CType(CType(53, Byte), Integer))
        Me.shapeControl6.Blink = False
        Me.shapeControl6.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl6.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl6.BorderWidth = 0
        Me.shapeControl6.CenterColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(202, Byte), Integer), CType(CType(91, Byte), Integer), CType(CType(171, Byte), Integer))
        Me.shapeControl6.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl6.Direction = ShapeControl.LineDirection.None
        Me.shapeControl6.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.shapeControl6.Location = New System.Drawing.Point(269, 243)
        Me.shapeControl6.Name = "shapeControl6"
        Me.shapeControl6.Shape = ShapeControl.ShapeType.Ellipse
        Me.shapeControl6.ShapeImage = CType(resources.GetObject("shapeControl6.ShapeImage"), System.Drawing.Image)
        Me.shapeControl6.Size = New System.Drawing.Size(100, 87)
        Me.shapeControl6.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(53, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(74, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl6.TabIndex = 9
        Me.shapeControl6.Tag2 = ""
        Me.shapeControl6.UseGradient = True
        Me.shapeControl6.Vibrate = False
        '
        'customControl112
        '
        Me.customControl112.AnimateBorder = False
        Me.customControl112.BackColor = System.Drawing.Color.FromArgb(CType(CType(122, Byte), Integer), CType(CType(126, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl112.Blink = False
        Me.customControl112.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl112.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl112.BorderWidth = 0
        Me.customControl112.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl112.Connector = ShapeControl.ConnecterType.Center
        Me.customControl112.Direction = ShapeControl.LineDirection.None
        Me.customControl112.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl112.Location = New System.Drawing.Point(635, 97)
        Me.customControl112.Name = "customControl112"
        Me.customControl112.Shape = ShapeControl.ShapeType.Rectangle
        Me.customControl112.ShapeImage = CType(resources.GetObject("customControl112.ShapeImage"), System.Drawing.Image)
        Me.customControl112.Size = New System.Drawing.Size(56, 58)
        Me.customControl112.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl112.TabIndex = 20
        Me.customControl112.Tag2 = ""
        Me.customControl112.UseGradient = False
        Me.customControl112.Vibrate = False
        '
        'customControl111
        '
        Me.customControl111.AnimateBorder = False
        Me.customControl111.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl111.Blink = False
        Me.customControl111.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl111.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl111.BorderWidth = 0
        Me.customControl111.CenterColor = System.Drawing.Color.FromArgb(CType(CType(76, Byte), Integer), CType(CType(164, Byte), Integer), CType(CType(232, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl111.Connector = ShapeControl.ConnecterType.Center
        Me.customControl111.Direction = ShapeControl.LineDirection.None
        Me.customControl111.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl111.Location = New System.Drawing.Point(635, 161)
        Me.customControl111.Name = "customControl111"
        Me.customControl111.Shape = ShapeControl.ShapeType.Rectangle
        Me.customControl111.ShapeImage = CType(resources.GetObject("customControl111.ShapeImage"), System.Drawing.Image)
        Me.customControl111.Size = New System.Drawing.Size(56, 52)
        Me.customControl111.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(110, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(61, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl111.TabIndex = 19
        Me.customControl111.Tag2 = ""
        Me.customControl111.UseGradient = True
        Me.customControl111.Vibrate = False
        '
        'customControl110
        '
        Me.customControl110.AnimateBorder = False
        Me.customControl110.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl110.Blink = False
        Me.customControl110.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl110.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl110.BorderWidth = 0
        Me.customControl110.CenterColor = System.Drawing.Color.FromArgb(CType(CType(76, Byte), Integer), CType(CType(164, Byte), Integer), CType(CType(232, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl110.Connector = ShapeControl.ConnecterType.Center
        Me.customControl110.Direction = ShapeControl.LineDirection.None
        Me.customControl110.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl110.Location = New System.Drawing.Point(754, 160)
        Me.customControl110.Name = "customControl110"
        Me.customControl110.Shape = ShapeControl.ShapeType.Rectangle
        Me.customControl110.ShapeImage = CType(resources.GetObject("customControl110.ShapeImage"), System.Drawing.Image)
        Me.customControl110.Size = New System.Drawing.Size(56, 52)
        Me.customControl110.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(110, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(61, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl110.TabIndex = 18
        Me.customControl110.Tag2 = ""
        Me.customControl110.UseGradient = True
        Me.customControl110.Vibrate = False
        '
        'customControl19
        '
        Me.customControl19.AnimateBorder = False
        Me.customControl19.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl19.Blink = False
        Me.customControl19.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl19.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl19.BorderWidth = 0
        Me.customControl19.CenterColor = System.Drawing.Color.FromArgb(CType(CType(76, Byte), Integer), CType(CType(164, Byte), Integer), CType(CType(232, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl19.Connector = ShapeControl.ConnecterType.Center
        Me.customControl19.Direction = ShapeControl.LineDirection.None
        Me.customControl19.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl19.Location = New System.Drawing.Point(692, 160)
        Me.customControl19.Name = "customControl19"
        Me.customControl19.Shape = ShapeControl.ShapeType.Rectangle
        Me.customControl19.ShapeImage = CType(resources.GetObject("customControl19.ShapeImage"), System.Drawing.Image)
        Me.customControl19.Size = New System.Drawing.Size(56, 52)
        Me.customControl19.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(110, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(61, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl19.TabIndex = 17
        Me.customControl19.Tag2 = ""
        Me.customControl19.UseGradient = True
        Me.customControl19.Vibrate = False
        '
        'customControl18
        '
        Me.customControl18.AnimateBorder = False
        Me.customControl18.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl18.Blink = False
        Me.customControl18.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl18.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl18.BorderWidth = 8
        Me.customControl18.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl18.Connector = ShapeControl.ConnecterType.Center
        Me.customControl18.Direction = ShapeControl.LineDirection.RightDown
        Me.customControl18.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl18.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl18.Location = New System.Drawing.Point(516, 116)
        Me.customControl18.Name = "customControl18"
        Me.customControl18.Shape = ShapeControl.ShapeType.LineVertical
        Me.customControl18.ShapeImage = Nothing
        Me.customControl18.Size = New System.Drawing.Size(43, 106)
        Me.customControl18.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl18.TabIndex = 16
        Me.customControl18.Tag2 = ""
        Me.customControl18.Text = "customControl18"
        Me.customControl18.UseGradient = False
        Me.customControl18.Vibrate = False
        '
        'customControl17
        '
        Me.customControl17.AnimateBorder = False
        Me.customControl17.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl17.Blink = False
        Me.customControl17.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl17.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl17.BorderWidth = 8
        Me.customControl17.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl17.Connector = ShapeControl.ConnecterType.Center
        Me.customControl17.Direction = ShapeControl.LineDirection.RightDown
        Me.customControl17.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl17.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl17.Location = New System.Drawing.Point(531, 214)
        Me.customControl17.Name = "customControl17"
        Me.customControl17.Shape = ShapeControl.ShapeType.LineDown
        Me.customControl17.ShapeImage = Nothing
        Me.customControl17.Size = New System.Drawing.Size(128, 108)
        Me.customControl17.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl17.TabIndex = 15
        Me.customControl17.Tag2 = ""
        Me.customControl17.Text = "customControl17"
        Me.customControl17.UseGradient = False
        Me.customControl17.Vibrate = False
        '
        'customControl16
        '
        Me.customControl16.AnimateBorder = False
        Me.customControl16.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl16.Blink = False
        Me.customControl16.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl16.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl16.BorderWidth = 8
        Me.customControl16.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl16.Connector = ShapeControl.ConnecterType.Center
        Me.customControl16.Direction = ShapeControl.LineDirection.LeftUp
        Me.customControl16.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl16.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl16.Location = New System.Drawing.Point(531, 43)
        Me.customControl16.Name = "customControl16"
        Me.customControl16.Shape = ShapeControl.ShapeType.LineUp
        Me.customControl16.ShapeImage = Nothing
        Me.customControl16.Size = New System.Drawing.Size(132, 79)
        Me.customControl16.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl16.TabIndex = 14
        Me.customControl16.Tag2 = ""
        Me.customControl16.Text = "customControl16"
        Me.customControl16.UseGradient = False
        Me.customControl16.Vibrate = False
        '
        'customControl15
        '
        Me.customControl15.AnimateBorder = False
        Me.customControl15.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl15.Blink = False
        Me.customControl15.BorderColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(213, Byte), Integer), CType(CType(251, Byte), Integer))
        Me.customControl15.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl15.BorderWidth = 4
        Me.customControl15.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl15.Connector = ShapeControl.ConnecterType.Center
        Me.customControl15.Direction = ShapeControl.LineDirection.None
        Me.customControl15.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl15.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl15.Location = New System.Drawing.Point(737, 118)
        Me.customControl15.Name = "customControl15"
        Me.customControl15.Shape = ShapeControl.ShapeType.LineVertical
        Me.customControl15.ShapeImage = Nothing
        Me.customControl15.Size = New System.Drawing.Size(20, 134)
        Me.customControl15.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl15.TabIndex = 13
        Me.customControl15.Tag2 = ""
        Me.customControl15.Text = "customControl15"
        Me.customControl15.UseGradient = False
        Me.customControl15.Vibrate = False
        '
        'customControl14
        '
        Me.customControl14.AnimateBorder = False
        Me.customControl14.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl14.Blink = False
        Me.customControl14.BorderColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(213, Byte), Integer), CType(CType(251, Byte), Integer))
        Me.customControl14.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl14.BorderWidth = 4
        Me.customControl14.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl14.Connector = ShapeControl.ConnecterType.Center
        Me.customControl14.Direction = ShapeControl.LineDirection.None
        Me.customControl14.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl14.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl14.Location = New System.Drawing.Point(645, 210)
        Me.customControl14.Name = "customControl14"
        Me.customControl14.Shape = ShapeControl.ShapeType.LineHorizontal
        Me.customControl14.ShapeImage = Nothing
        Me.customControl14.Size = New System.Drawing.Size(141, 12)
        Me.customControl14.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl14.TabIndex = 12
        Me.customControl14.Tag2 = ""
        Me.customControl14.Text = "customControl14"
        Me.customControl14.UseGradient = False
        Me.customControl14.Vibrate = False
        '
        'customControl13
        '
        Me.customControl13.AnimateBorder = False
        Me.customControl13.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl13.Blink = False
        Me.customControl13.BorderColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(213, Byte), Integer), CType(CType(251, Byte), Integer))
        Me.customControl13.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl13.BorderWidth = 4
        Me.customControl13.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl13.Connector = ShapeControl.ConnecterType.Center
        Me.customControl13.Direction = ShapeControl.LineDirection.None
        Me.customControl13.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl13.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl13.Location = New System.Drawing.Point(685, 95)
        Me.customControl13.Name = "customControl13"
        Me.customControl13.Shape = ShapeControl.ShapeType.LineUp
        Me.customControl13.ShapeImage = Nothing
        Me.customControl13.Size = New System.Drawing.Size(20, 158)
        Me.customControl13.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl13.TabIndex = 11
        Me.customControl13.Tag2 = ""
        Me.customControl13.Text = "customControl13"
        Me.customControl13.UseGradient = False
        Me.customControl13.Vibrate = False
        '
        'customControl12
        '
        Me.customControl12.AnimateBorder = False
        Me.customControl12.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl12.Blink = False
        Me.customControl12.BorderColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(213, Byte), Integer), CType(CType(251, Byte), Integer))
        Me.customControl12.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl12.BorderWidth = 4
        Me.customControl12.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl12.Connector = ShapeControl.ConnecterType.Center
        Me.customControl12.Direction = ShapeControl.LineDirection.None
        Me.customControl12.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl12.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl12.Location = New System.Drawing.Point(635, 143)
        Me.customControl12.Name = "customControl12"
        Me.customControl12.Shape = ShapeControl.ShapeType.LineUp
        Me.customControl12.ShapeImage = Nothing
        Me.customControl12.Size = New System.Drawing.Size(150, 25)
        Me.customControl12.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl12.TabIndex = 10
        Me.customControl12.Tag2 = ""
        Me.customControl12.Text = "customControl12"
        Me.customControl12.UseGradient = False
        Me.customControl12.Vibrate = False
        '
        'customControl11
        '
        Me.customControl11.AnimateBorder = False
        Me.customControl11.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.customControl11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
        Me.customControl11.Blink = False
        Me.customControl11.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl11.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.customControl11.BorderWidth = 0
        Me.customControl11.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.customControl11.Connector = ShapeControl.ConnecterType.Center
        Me.customControl11.Direction = ShapeControl.LineDirection.None
        Me.customControl11.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.customControl11.Location = New System.Drawing.Point(394, 116)
        Me.customControl11.Name = "customControl11"
        Me.customControl11.Shape = ShapeControl.ShapeType.Ellipse
        Me.customControl11.ShapeImage = Nothing
        Me.customControl11.Size = New System.Drawing.Size(97, 96)
        Me.customControl11.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(194, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(171, Byte), Integer), CType(CType(11, Byte), Integer))
        Me.customControl11.TabIndex = 9
        Me.customControl11.Tag2 = ""
        Me.customControl11.UseGradient = True
        Me.customControl11.Vibrate = False
        '
        'shapeControl5
        '
        Me.shapeControl5.AnimateBorder = False
        Me.shapeControl5.BackColor = System.Drawing.Color.FromArgb(CType(CType(198, Byte), Integer), CType(CType(227, Byte), Integer), CType(CType(251, Byte), Integer), CType(CType(72, Byte), Integer))
        Me.shapeControl5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl5.Blink = False
        Me.shapeControl5.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl5.BorderStyle = System.Drawing.Drawing2D.DashStyle.Dot
        Me.shapeControl5.BorderWidth = 2
        Me.shapeControl5.CenterColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl5.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl5.Direction = ShapeControl.LineDirection.None
        Me.shapeControl5.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.shapeControl5.Location = New System.Drawing.Point(259, 16)
        Me.shapeControl5.Name = "shapeControl5"
        Me.shapeControl5.Shape = ShapeControl.ShapeType.BallonSE
        Me.shapeControl5.ShapeImage = Nothing
        Me.shapeControl5.Size = New System.Drawing.Size(144, 106)
        Me.shapeControl5.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl5.TabIndex = 6
        Me.shapeControl5.Tag2 = ""
        Me.shapeControl5.Text = "Hello, I am Tommy"
        Me.shapeControl5.UseGradient = False
        Me.shapeControl5.Vibrate = False
        Me.shapeControl5.Visible = False
        '
        'shapeControl7
        '
        Me.shapeControl7.AnimateBorder = False
        Me.shapeControl7.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl7.Blink = False
        Me.shapeControl7.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl7.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl7.BorderWidth = 1
        Me.shapeControl7.CenterColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl7.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl7.Direction = ShapeControl.LineDirection.None
        Me.shapeControl7.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.shapeControl7.Location = New System.Drawing.Point(428, 85)
        Me.shapeControl7.Name = "shapeControl7"
        Me.shapeControl7.Shape = ShapeControl.ShapeType.CustomPolygon
        Me.shapeControl7.ShapeImage = Nothing
        Me.shapeControl7.Size = New System.Drawing.Size(23, 22)
        Me.shapeControl7.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(100, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl7.TabIndex = 8
        Me.shapeControl7.Tag2 = ""
        Me.shapeControl7.UseGradient = False
        Me.shapeControl7.Vibrate = False
        '
        'shapeControl4
        '
        Me.shapeControl4.AnimateBorder = False
        Me.shapeControl4.BackColor = System.Drawing.Color.FromArgb(CType(CType(124, Byte), Integer), CType(CType(92, Byte), Integer), CType(CType(159, Byte), Integer), CType(CType(83, Byte), Integer))
        Me.shapeControl4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl4.Blink = False
        Me.shapeControl4.BorderColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(131, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(4, Byte), Integer))
        Me.shapeControl4.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl4.BorderWidth = 0
        Me.shapeControl4.CenterColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl4.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl4.Direction = ShapeControl.LineDirection.None
        Me.shapeControl4.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.shapeControl4.Location = New System.Drawing.Point(394, 227)
        Me.shapeControl4.Name = "shapeControl4"
        Me.shapeControl4.Shape = ShapeControl.ShapeType.RoundedRectangle
        Me.shapeControl4.ShapeImage = Nothing
        Me.shapeControl4.Size = New System.Drawing.Size(97, 43)
        Me.shapeControl4.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl4.TabIndex = 5
        Me.shapeControl4.Tag2 = ""
        Me.shapeControl4.Text = "Click Me!"
        Me.shapeControl4.UseGradient = False
        Me.shapeControl4.Vibrate = False
        '
        'shapeControl3
        '
        Me.shapeControl3.AnimateBorder = False
        Me.shapeControl3.BackColor = System.Drawing.Color.FromArgb(CType(CType(124, Byte), Integer), CType(CType(92, Byte), Integer), CType(CType(159, Byte), Integer), CType(CType(83, Byte), Integer))
        Me.shapeControl3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl3.Blink = False
        Me.shapeControl3.BorderColor = System.Drawing.Color.FromArgb(CType(CType(131, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(4, Byte), Integer))
        Me.shapeControl3.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl3.BorderWidth = 0
        Me.shapeControl3.CenterColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl3.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl3.Direction = ShapeControl.LineDirection.None
        Me.shapeControl3.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.shapeControl3.Location = New System.Drawing.Point(394, 287)
        Me.shapeControl3.Name = "shapeControl3"
        Me.shapeControl3.Shape = ShapeControl.ShapeType.RoundedRectangle
        Me.shapeControl3.ShapeImage = Nothing
        Me.shapeControl3.Size = New System.Drawing.Size(97, 35)
        Me.shapeControl3.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl3.TabIndex = 4
        Me.shapeControl3.Tag2 = ""
        Me.shapeControl3.Text = "Close"
        Me.shapeControl3.UseGradient = False
        Me.shapeControl3.Vibrate = False
        '
        'shapeControl2
        '
        Me.shapeControl2.AnimateBorder = False
        Me.shapeControl2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl2.Blink = False
        Me.shapeControl2.BorderColor = System.Drawing.Color.FromArgb(CType(CType(118, Byte), Integer), CType(CType(133, Byte), Integer), CType(CType(4, Byte), Integer), CType(CType(9, Byte), Integer))
        Me.shapeControl2.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl2.BorderWidth = 0
        Me.shapeControl2.CenterColor = System.Drawing.Color.FromArgb(CType(CType(90, Byte), Integer), CType(CType(163, Byte), Integer), CType(CType(126, Byte), Integer), CType(CType(59, Byte), Integer))
        Me.shapeControl2.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl2.Direction = ShapeControl.LineDirection.None
        Me.shapeControl2.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold)
        Me.shapeControl2.Location = New System.Drawing.Point(366, 78)
        Me.shapeControl2.Name = "shapeControl2"
        Me.shapeControl2.Shape = ShapeControl.ShapeType.TriangleUp
        Me.shapeControl2.ShapeImage = Nothing
        Me.shapeControl2.Size = New System.Drawing.Size(152, 32)
        Me.shapeControl2.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(122, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl2.TabIndex = 3
        Me.shapeControl2.Tag2 = ""
        Me.shapeControl2.UseGradient = True
        Me.shapeControl2.Vibrate = False
        '
        'shapeControl1
        '
        Me.shapeControl1.AnimateBorder = False
        Me.shapeControl1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.shapeControl1.Blink = False
        Me.shapeControl1.BorderColor = System.Drawing.Color.FromArgb(CType(CType(98, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl1.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid
        Me.shapeControl1.BorderWidth = 0
        Me.shapeControl1.CenterColor = System.Drawing.Color.FromArgb(CType(CType(85, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(253, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.shapeControl1.Connector = ShapeControl.ConnecterType.Center
        Me.shapeControl1.Direction = ShapeControl.LineDirection.None
        Me.shapeControl1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.shapeControl1.ForeColor = System.Drawing.Color.Yellow
        Me.shapeControl1.Location = New System.Drawing.Point(32, 36)
        Me.shapeControl1.Name = "shapeControl1"
        Me.shapeControl1.Shape = ShapeControl.ShapeType.Diamond
        Me.shapeControl1.ShapeImage = Nothing
        Me.shapeControl1.Size = New System.Drawing.Size(119, 143)
        Me.shapeControl1.SurroundColor = System.Drawing.Color.FromArgb(CType(CType(69, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shapeControl1.TabIndex = 0
        Me.shapeControl1.Tag2 = ""
        Me.shapeControl1.Text = "Transparency Test Drag Me Around"
        Me.shapeControl1.UseGradient = True
        Me.shapeControl1.Vibrate = False
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
        Me.ClientSize = New System.Drawing.Size(815, 372)
        Me.ControlBox = False
        Me.Controls.Add(Me.customControl113)
        Me.Controls.Add(Me.shapeControl6)
        Me.Controls.Add(Me.customControl112)
        Me.Controls.Add(Me.customControl111)
        Me.Controls.Add(Me.customControl110)
        Me.Controls.Add(Me.customControl19)
        Me.Controls.Add(Me.customControl18)
        Me.Controls.Add(Me.customControl17)
        Me.Controls.Add(Me.customControl16)
        Me.Controls.Add(Me.customControl15)
        Me.Controls.Add(Me.customControl14)
        Me.Controls.Add(Me.customControl13)
        Me.Controls.Add(Me.customControl12)
        Me.Controls.Add(Me.customControl11)
        Me.Controls.Add(Me.shapeControl5)
        Me.Controls.Add(Me.shapeControl7)
        Me.Controls.Add(Me.shapeControl4)
        Me.Controls.Add(Me.shapeControl3)
        Me.Controls.Add(Me.shapeControl2)
        Me.Controls.Add(Me.panel1)
        Me.DoubleBuffered = True
        Me.Name = "Form1"
        Me.panel1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
	#End Region

	''' <summary>
	''' The main entry point for the application.
	''' </summary>
	<STAThread> _
	Private Shared Sub Main()
		Application.Run(New Form1())
	End Sub

    Private Sub shapeControl1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles shapeControl1.MouseDown
        If e.Button.Equals(MouseButtons.Left) Then
            sx = e.X
            'tempregion = ((ShapeControl.CustomControl1)sender).Region.Clone();
            '((ShapeControl.CustomControl1)sender).Region = null;

            sy = e.Y
        End If
    End Sub

    Private Sub shapeControl1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles shapeControl1.MouseMove
        If e.Button.Equals(MouseButtons.Left) Then
            DirectCast(sender, Control).Left = DirectCast(sender, Control).Left + (e.X - sx)

            DirectCast(sender, Control).Top = DirectCast(sender, Control).Top + (e.Y - sy)
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.DoubleBuffered = True
        GetType(Panel).InvokeMember("DoubleBuffered", BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.SetProperty, Nothing, panel1, New Object() {True})
    End Sub

    Private Sub shapeControl4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles shapeControl4.Click
        shapeControl5.Visible = True
        customControl11.AnimateBorder = True
        customControl16.AnimateBorder = True
        customControl17.AnimateBorder = True
        customControl18.AnimateBorder = True
        Me.Refresh()


        Dim t1 As Long = DateTime.Now.Ticks + 20000000
        While DateTime.Now.Ticks < t1
            Application.DoEvents()
        End While

        customControl11.AnimateBorder = False
        customControl16.AnimateBorder = False
        customControl17.AnimateBorder = False
        customControl18.AnimateBorder = False
        shapeControl5.Visible = False

        Me.Refresh()

    End Sub

    Private Sub shapeControl3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click, shapeControl3.Click
        Me.Close()
    End Sub





End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Coder. Hacker. Fixer.

Comments and Discussions