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

Wobbly Menu - An Inspiration from iPhone

Rate me:
Please Sign up or sign in to vote.
4.87/5 (33 votes)
17 Mar 2010CPOL3 min read 72.4K   2.5K   75  
iPhone like menu system and wobbly re-arrangement technique with a useful sample application
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmTitle
    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()
        Me.components = New System.ComponentModel.Container
        Me.btnClose = New System.Windows.Forms.Label
        Me.cntxTitle = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.StartArrangeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.StopArrangeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.cntxTitle.SuspendLayout()
        Me.SuspendLayout()
        '
        'btnClose
        '
        Me.btnClose.BackColor = System.Drawing.Color.Transparent
        Me.btnClose.Dock = System.Windows.Forms.DockStyle.Right
        Me.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btnClose.Image = Global.WobblyMenu.Control.My.Resources.Resources.close
        Me.btnClose.Location = New System.Drawing.Point(120, 0)
        Me.btnClose.Name = "btnClose"
        Me.btnClose.Size = New System.Drawing.Size(20, 278)
        Me.btnClose.TabIndex = 0
        '
        'cntxTitle
        '
        Me.cntxTitle.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StartArrangeToolStripMenuItem, Me.StopArrangeToolStripMenuItem})
        Me.cntxTitle.Name = "cntxTitle"
        Me.cntxTitle.Size = New System.Drawing.Size(141, 48)
        '
        'StartArrangeToolStripMenuItem
        '
        Me.StartArrangeToolStripMenuItem.Name = "StartArrangeToolStripMenuItem"
        Me.StartArrangeToolStripMenuItem.Size = New System.Drawing.Size(140, 22)
        Me.StartArrangeToolStripMenuItem.Text = "Start Arrange"
        '
        'StopArrangeToolStripMenuItem
        '
        Me.StopArrangeToolStripMenuItem.Name = "StopArrangeToolStripMenuItem"
        Me.StopArrangeToolStripMenuItem.Size = New System.Drawing.Size(140, 22)
        Me.StopArrangeToolStripMenuItem.Text = "Stop Arrange"
        '
        'frmTitle
        '
        Me.AllowDrop = True
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.Snow
        Me.ClientSize = New System.Drawing.Size(140, 278)
        Me.ContextMenuStrip = Me.cntxTitle
        Me.ControlBox = False
        Me.Controls.Add(Me.btnClose)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.Name = "frmTitle"
        Me.Text = "Form1"
        Me.TransparencyKey = System.Drawing.Color.Snow
        Me.cntxTitle.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents btnClose As System.Windows.Forms.Label
    Friend WithEvents cntxTitle As System.Windows.Forms.ContextMenuStrip
    Friend WithEvents StartArrangeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents StopArrangeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem

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) eHips Ltd
United Kingdom United Kingdom
Having more than 10 years experience in software development and currently working for eHips Ltd in Oxford, UK. Expert in C# and VB.NET. Also Expert in technologies such as GDI+, ADO.NET, XML, XSD etc. Started the career as a VB6.0 developer and moved on to .NET with its beta release. Experience includes real-time system development, distributed systems, Work flow systems, control system development and web 2.0 systems.

Comments and Discussions