Click here to Skip to main content
12,701,601 members (34,349 online)
Click here to Skip to main content
Articles » Languages » VB.NET » General » Downloads

Stats

57.9K views
2.7K downloads
47 bookmarked
Posted

Drop-Down Calculator

, 7 Dec 2006 CPOL
In-Place Drop-Down calculator control in VB.NET
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class DemoForm
    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)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    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.TextBox1 = New System.Windows.Forms.TextBox
        Me.Button2 = New System.Windows.Forms.Button
        Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown
        Me.ComboBox1 = New System.Windows.Forms.ComboBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.CalculatorButton4 = New PopupCalculator.CalculatorButton
        Me.CalculatorButton3 = New PopupCalculator.CalculatorButton
        Me.CalculatorButton2 = New PopupCalculator.CalculatorButton
        Me.CalculatorButton1 = New PopupCalculator.CalculatorButton
        Me.Button1 = New PopupCalculator.CalculatorButton
        CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(12, 22)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(100, 20)
        Me.TextBox1.TabIndex = 0
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(12, 48)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(100, 23)
        Me.Button2.TabIndex = 2
        Me.Button2.Text = "Button2"
        Me.Button2.UseVisualStyleBackColor = True
        '
        'NumericUpDown1
        '
        Me.NumericUpDown1.Location = New System.Drawing.Point(12, 77)
        Me.NumericUpDown1.Name = "NumericUpDown1"
        Me.NumericUpDown1.Size = New System.Drawing.Size(100, 20)
        Me.NumericUpDown1.TabIndex = 4
        '
        'ComboBox1
        '
        Me.ComboBox1.FormattingEnabled = True
        Me.ComboBox1.Location = New System.Drawing.Point(12, 103)
        Me.ComboBox1.Name = "ComboBox1"
        Me.ComboBox1.Size = New System.Drawing.Size(100, 21)
        Me.ComboBox1.TabIndex = 6
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(73, 137)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(39, 13)
        Me.Label1.TabIndex = 8
        Me.Label1.Text = "Label1"
        '
        'CalculatorButton4
        '
        Me.CalculatorButton4.AssociatedControl = Me.Label1
        Me.CalculatorButton4.Location = New System.Drawing.Point(118, 132)
        Me.CalculatorButton4.Name = "CalculatorButton4"
        Me.CalculatorButton4.Size = New System.Drawing.Size(22, 23)
        Me.CalculatorButton4.TabIndex = 9
        Me.CalculatorButton4.UseVisualStyleBackColor = True
        '
        'CalculatorButton3
        '
        Me.CalculatorButton3.AssociatedControl = Me.ComboBox1
        Me.CalculatorButton3.Location = New System.Drawing.Point(118, 103)
        Me.CalculatorButton3.Name = "CalculatorButton3"
        Me.CalculatorButton3.Size = New System.Drawing.Size(22, 23)
        Me.CalculatorButton3.TabIndex = 7
        Me.CalculatorButton3.UseVisualStyleBackColor = True
        '
        'CalculatorButton2
        '
        Me.CalculatorButton2.AssociatedControl = Me.NumericUpDown1
        Me.CalculatorButton2.Location = New System.Drawing.Point(118, 74)
        Me.CalculatorButton2.Name = "CalculatorButton2"
        Me.CalculatorButton2.Size = New System.Drawing.Size(22, 23)
        Me.CalculatorButton2.TabIndex = 5
        Me.CalculatorButton2.UseVisualStyleBackColor = True
        '
        'CalculatorButton1
        '
        Me.CalculatorButton1.AssociatedControl = Me.Button2
        Me.CalculatorButton1.Location = New System.Drawing.Point(118, 48)
        Me.CalculatorButton1.Name = "CalculatorButton1"
        Me.CalculatorButton1.Size = New System.Drawing.Size(22, 23)
        Me.CalculatorButton1.TabIndex = 3
        Me.CalculatorButton1.UseVisualStyleBackColor = True
        '
        'Button1
        '
        Me.Button1.AssociatedControl = Me.TextBox1
        Me.Button1.Location = New System.Drawing.Point(118, 19)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(22, 23)
        Me.Button1.TabIndex = 1
        Me.Button1.UseVisualStyleBackColor = True
        '
        'DemoForm
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(152, 166)
        Me.Controls.Add(Me.CalculatorButton4)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.CalculatorButton3)
        Me.Controls.Add(Me.ComboBox1)
        Me.Controls.Add(Me.CalculatorButton2)
        Me.Controls.Add(Me.NumericUpDown1)
        Me.Controls.Add(Me.CalculatorButton1)
        Me.Controls.Add(Me.Button2)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.TextBox1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
        Me.Name = "DemoForm"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Demo"
        CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Button1 As PopupCalculator.CalculatorButton
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents CalculatorButton1 As PopupCalculator.CalculatorButton
    Friend WithEvents NumericUpDown1 As System.Windows.Forms.NumericUpDown
    Friend WithEvents CalculatorButton2 As PopupCalculator.CalculatorButton
    Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
    Friend WithEvents CalculatorButton3 As PopupCalculator.CalculatorButton
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents CalculatorButton4 As PopupCalculator.CalculatorButton
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)

Share

About the Author

Raju Kandasamy
Web Developer
India India
Working as a Techical Lead in a leading Geographical Information Systems development organisation based in Trichy (India).
Started learning .NET technologies through the various articles hosted in codeproject. And was looking for a day when I can post articles. I hope I did it Smile | :)
Visit my other sites
http://www.text2pdf.co.cc
http://www.pdfmaker.co.cc

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 7 Dec 2006
Article Copyright 2006 by Raju Kandasamy
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid