Click here to Skip to main content
15,892,005 members
Articles / Multimedia / GDI+

Creating Glow Button

Rate me:
Please Sign up or sign in to vote.
4.86/5 (23 votes)
24 Apr 20073 min read 129.2K   5.8K   83  
An article of how to make a button that can glow
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim CalmCyan10 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan11 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan12 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan13 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan14 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan15 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan16 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan17 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Dim CalmCyan18 As GlowingButton.CalmCyan = New GlowingButton.CalmCyan
        Me.Button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button3 = New System.Windows.Forms.Button
        Me.Button4 = New System.Windows.Forms.Button
        Me.Grid1 = New GlowingButton.Grid
        Me.GlowButton7 = New GlowingButton.GlowButton
        Me.GlowButton8 = New GlowingButton.GlowButton
        Me.GlowButton9 = New GlowingButton.GlowButton
        Me.GlowButton4 = New GlowingButton.GlowButton
        Me.GlowButton5 = New GlowingButton.GlowButton
        Me.GlowButton6 = New GlowingButton.GlowButton
        Me.GlowButton3 = New GlowingButton.GlowButton
        Me.GlowButton2 = New GlowingButton.GlowButton
        Me.GlowButton1 = New GlowingButton.GlowButton
        Me.Grid1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(177, 28)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(75, 23)
        Me.Button1.TabIndex = 1
        Me.Button1.Text = "Original"
        Me.Button1.UseVisualStyleBackColor = True
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(177, 57)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(75, 23)
        Me.Button2.TabIndex = 2
        Me.Button2.Text = "Alternate"
        Me.Button2.UseVisualStyleBackColor = True
        '
        'Button3
        '
        Me.Button3.Location = New System.Drawing.Point(177, 86)
        Me.Button3.Name = "Button3"
        Me.Button3.Size = New System.Drawing.Size(75, 23)
        Me.Button3.TabIndex = 3
        Me.Button3.Text = "Pattern 1"
        Me.Button3.UseVisualStyleBackColor = True
        '
        'Button4
        '
        Me.Button4.Location = New System.Drawing.Point(177, 121)
        Me.Button4.Name = "Button4"
        Me.Button4.Size = New System.Drawing.Size(75, 23)
        Me.Button4.TabIndex = 4
        Me.Button4.Text = "Pattern 2"
        Me.Button4.UseVisualStyleBackColor = True
        '
        'Grid1
        '
        Me.Grid1.Controls.Add(Me.GlowButton7)
        Me.Grid1.Controls.Add(Me.GlowButton8)
        Me.Grid1.Controls.Add(Me.GlowButton9)
        Me.Grid1.Controls.Add(Me.GlowButton4)
        Me.Grid1.Controls.Add(Me.GlowButton5)
        Me.Grid1.Controls.Add(Me.GlowButton6)
        Me.Grid1.Controls.Add(Me.GlowButton3)
        Me.Grid1.Controls.Add(Me.GlowButton2)
        Me.Grid1.Controls.Add(Me.GlowButton1)
        Me.Grid1.GlowColor = System.Drawing.Color.Empty
        Me.Grid1.GlowStartPoint = New System.Drawing.Point(0, 0)
        Me.Grid1.GlowStyle = GlowingButton.Grid.GlowStyles.None
        Me.Grid1.Location = New System.Drawing.Point(21, 28)
        Me.Grid1.Name = "Grid1"
        Me.Grid1.Size = New System.Drawing.Size(116, 116)
        Me.Grid1.TabIndex = 0
        '
        'GlowButton7
        '
        Me.GlowButton7.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton7.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton7.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton7.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton7.Location = New System.Drawing.Point(8, 74)
        Me.GlowButton7.Name = "GlowButton7"
        Me.GlowButton7.Renderer = CalmCyan10
        Me.GlowButton7.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton7.TabIndex = 3
        Me.GlowButton7.Text = "7"
        '
        'GlowButton8
        '
        Me.GlowButton8.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton8.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton8.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton8.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton8.Location = New System.Drawing.Point(41, 74)
        Me.GlowButton8.Name = "GlowButton8"
        Me.GlowButton8.Renderer = CalmCyan11
        Me.GlowButton8.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton8.TabIndex = 4
        Me.GlowButton8.Text = "8"
        '
        'GlowButton9
        '
        Me.GlowButton9.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton9.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton9.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton9.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton9.Location = New System.Drawing.Point(74, 74)
        Me.GlowButton9.Name = "GlowButton9"
        Me.GlowButton9.Renderer = CalmCyan12
        Me.GlowButton9.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton9.TabIndex = 5
        Me.GlowButton9.Text = "9"
        '
        'GlowButton4
        '
        Me.GlowButton4.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton4.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton4.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton4.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton4.Location = New System.Drawing.Point(8, 41)
        Me.GlowButton4.Name = "GlowButton4"
        Me.GlowButton4.Renderer = CalmCyan13
        Me.GlowButton4.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton4.TabIndex = 3
        Me.GlowButton4.Text = "4"
        '
        'GlowButton5
        '
        Me.GlowButton5.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton5.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton5.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton5.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton5.Location = New System.Drawing.Point(41, 41)
        Me.GlowButton5.Name = "GlowButton5"
        Me.GlowButton5.Renderer = CalmCyan14
        Me.GlowButton5.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton5.TabIndex = 4
        Me.GlowButton5.Text = "5"
        '
        'GlowButton6
        '
        Me.GlowButton6.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton6.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton6.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton6.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton6.Location = New System.Drawing.Point(74, 41)
        Me.GlowButton6.Name = "GlowButton6"
        Me.GlowButton6.Renderer = CalmCyan15
        Me.GlowButton6.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton6.TabIndex = 5
        Me.GlowButton6.Text = "6"
        '
        'GlowButton3
        '
        Me.GlowButton3.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton3.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton3.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton3.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton3.Location = New System.Drawing.Point(74, 8)
        Me.GlowButton3.Name = "GlowButton3"
        Me.GlowButton3.Renderer = CalmCyan16
        Me.GlowButton3.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton3.TabIndex = 3
        Me.GlowButton3.Text = "3"
        '
        'GlowButton2
        '
        Me.GlowButton2.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton2.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton2.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton2.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton2.Location = New System.Drawing.Point(41, 8)
        Me.GlowButton2.Name = "GlowButton2"
        Me.GlowButton2.Renderer = CalmCyan17
        Me.GlowButton2.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton2.TabIndex = 2
        Me.GlowButton2.Text = "2"
        '
        'GlowButton1
        '
        Me.GlowButton1.BackColor = System.Drawing.Color.Transparent
        Me.GlowButton1.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.GlowButton1.Layer = GlowingButton.GlowButton.LayerStatus.None
        Me.GlowButton1.LayerColor = System.Drawing.Color.FromArgb(CType(CType(150, Byte), Integer), CType(CType(93, Byte), Integer), CType(CType(198, Byte), Integer), CType(CType(241, Byte), Integer))
        Me.GlowButton1.Location = New System.Drawing.Point(8, 8)
        Me.GlowButton1.Name = "GlowButton1"
        Me.GlowButton1.Renderer = CalmCyan18
        Me.GlowButton1.Size = New System.Drawing.Size(34, 34)
        Me.GlowButton1.TabIndex = 1
        Me.GlowButton1.Text = "1"
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(284, 264)
        Me.Controls.Add(Me.Button4)
        Me.Controls.Add(Me.Button3)
        Me.Controls.Add(Me.Button2)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.Grid1)
        Me.Name = "Form1"
        Me.Text = "Glow Button Demo"
        Me.Grid1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents Grid1 As GlowingButton.Grid
    Friend WithEvents GlowButton7 As GlowingButton.GlowButton
    Friend WithEvents GlowButton8 As GlowingButton.GlowButton
    Friend WithEvents GlowButton9 As GlowingButton.GlowButton
    Friend WithEvents GlowButton4 As GlowingButton.GlowButton
    Friend WithEvents GlowButton5 As GlowingButton.GlowButton
    Friend WithEvents GlowButton6 As GlowingButton.GlowButton
    Friend WithEvents GlowButton3 As GlowingButton.GlowButton
    Friend WithEvents GlowButton2 As GlowingButton.GlowButton
    Friend WithEvents GlowButton1 As GlowingButton.GlowButton
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Button4 As System.Windows.Forms.Button

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Team Leader Component Crafts
Indonesia Indonesia
Got his BA in Information and Technology from University of Surabaya, Indonesia in 2004. Finished his post graduate at Magistrate and Management Institute of Technology, Surabaya in 2009.

He has developed several middle to large scale enterprise application, mostly on windows based architecture.

Currently working as IT Manager on a company based on Sidoarjo.

Comments and Discussions