Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If 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. Friend WithEvents grpboxOptions As System.Windows.Forms.GroupBox Friend WithEvents chkWaiting As System.Windows.Forms.CheckBox Friend WithEvents chkForwarding As System.Windows.Forms.CheckBox Friend WithEvents chkCallerID As System.Windows.Forms.CheckBox Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents lblTotal As System.Windows.Forms.Label Private Sub InitializeComponent() Me.grpboxOptions = New System.Windows.Forms.GroupBox Me.chkCallerID = New System.Windows.Forms.CheckBox Me.chkForwarding = New System.Windows.Forms.CheckBox Me.chkWaiting = New System.Windows.Forms.CheckBox Me.btnCalc = New System.Windows.Forms.Button Me.lblTotal = New System.Windows.Forms.Label Me.grpboxOptions.SuspendLayout() Me.SuspendLayout() ' 'grpboxOptions ' Me.grpboxOptions.Controls.Add(Me.chkCallerID) Me.grpboxOptions.Controls.Add(Me.chkForwarding) Me.grpboxOptions.Controls.Add(Me.chkWaiting) Me.grpboxOptions.Location = New System.Drawing.Point(40, 24) Me.grpboxOptions.Name = "grpboxOptions" Me.grpboxOptions.Size = New System.Drawing.Size(192, 152) Me.grpboxOptions.TabIndex = 0 Me.grpboxOptions.TabStop = False Me.grpboxOptions.Text = "Select options" ' 'chkCallerID ' Me.chkCallerID.Location = New System.Drawing.Point(16, 112) Me.chkCallerID.Name = "chkCallerID" Me.chkCallerID.Size = New System.Drawing.Size(144, 24) Me.chkCallerID.TabIndex = 2 Me.chkCallerID.Text = "Caller ID" ' 'chkForwarding ' Me.chkForwarding.Location = New System.Drawing.Point(16, 72) Me.chkForwarding.Name = "chkForwarding" Me.chkForwarding.Size = New System.Drawing.Size(144, 24) Me.chkForwarding.TabIndex = 1 Me.chkForwarding.Text = "Call Forwarding" ' 'chkWaiting ' Me.chkWaiting.Location = New System.Drawing.Point(16, 32) Me.chkWaiting.Name = "chkWaiting" Me.chkWaiting.Size = New System.Drawing.Size(144, 24) Me.chkWaiting.TabIndex = 0 Me.chkWaiting.Text = "Call Waiting" ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(24, 208) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(120, 32) Me.btnCalc.TabIndex = 1 Me.btnCalc.Text = "Calculate" ' 'lblTotal ' Me.lblTotal.Location = New System.Drawing.Point(184, 208) Me.lblTotal.Name = "lblTotal" Me.lblTotal.Size = New System.Drawing.Size(88, 32) Me.lblTotal.TabIndex = 2 ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.SystemColors.ActiveBorder Me.ClientSize = New System.Drawing.Size(296, 253) Me.Controls.Add(Me.lblTotal) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.grpboxOptions) Me.ForeColor = System.Drawing.Color.DarkSlateBlue Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "Form1" Me.Opacity = 0.95 Me.Text = "Phone Bill" Me.grpboxOptions.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click Dim forward = Me.chkForwarding.Checked Dim caller = Me.chkCallerID.Checked Dim waiting = Me.chkWaiting.Checked Static total As Decimal = 25.0 If forward Then total = total + 3.5 ElseIf caller Then total = total + 3.5 ElseIf waiting Then total = total + 3.5 End If Me.lblTotal.Text = "Total: $" & total If total = 39 Then total = 35.5 Me.lblTotal.Text = "Total: $" & total End If End Sub End Class