Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '1. Input: Get Number of Diskettes being sold Dim diskettes, cost As Double diskettes = CDbl(InputBox("Enter number of diskettes being purchased.")) '2. Calculate: Compute number of diskettes sold at certain price cost = diskettes * 0.25 If (cost > 99) Then cost = diskettes * 0.2 End If '3. Display: Show cost of diskettes txtoutput.Text = "The cost of the diskettes being purchased is " & FormatCurrency(cost) End Sub End Class _ Partial Class Form1 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. _ 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. _ Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button Me.txtoutput = New System.Windows.Forms.TextBox Me.Label1 = New System.Windows.Forms.Label Me.SuspendLayout() ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.White Me.Button1.Font = New System.Drawing.Font("Arial Black", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(30, Byte), Integer), CType(CType(135, Byte), Integer), CType(CType(185, Byte), Integer)) Me.Button1.Location = New System.Drawing.Point(152, 104) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(157, 64) Me.Button1.TabIndex = 0 Me.Button1.Text = "Push Me" Me.Button1.UseVisualStyleBackColor = False ' 'txtoutput ' Me.txtoutput.Location = New System.Drawing.Point(25, 219) Me.txtoutput.Name = "txtoutput" Me.txtoutput.Size = New System.Drawing.Size(419, 20) Me.txtoutput.TabIndex = 1 ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Font = New System.Drawing.Font("Arial Black", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.Location = New System.Drawing.Point(175, 186) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(106, 30) Me.Label1.TabIndex = 2 Me.Label1.Text = "Answer:" ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(53, Byte), Integer), CType(CType(154, Byte), Integer), CType(CType(172, Byte), Integer)) Me.ClientSize = New System.Drawing.Size(489, 374) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.txtoutput) Me.Controls.Add(Me.Button1) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents txtoutput As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label End Class