ublic 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 LblTypeNumBooks As System.Windows.Forms.Label
Friend WithEvents LblTypeNumDaysLate As System.Windows.Forms.Label
Friend WithEvents LblShowFines As System.Windows.Forms.Label
Friend WithEvents LlbThankYou As System.Windows.Forms.Label
Friend WithEvents TxtListNumBooks As System.Windows.Forms.TextBox
Friend WithEvents TxtListNumDaysLate As System.Windows.Forms.TextBox
Friend WithEvents BtnCalulateFines As System.Windows.Forms.Button
Friend WithEvents BtnExit As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.LblTypeNumBooks = New System.Windows.Forms.Label()
Me.LblTypeNumDaysLate = New System.Windows.Forms.Label()
Me.LblShowFines = New System.Windows.Forms.Label()
Me.LlbThankYou = New System.Windows.Forms.Label()
Me.TxtListNumBooks = New System.Windows.Forms.TextBox()
Me.TxtListNumDaysLate = New System.Windows.Forms.TextBox()
Me.BtnCalulateFines = New System.Windows.Forms.Button()
Me.BtnExit = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'LblTypeNumBooks
'
Me.LblTypeNumBooks.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LblTypeNumBooks.ForeColor = System.Drawing.Color.Blue
Me.LblTypeNumBooks.Location = New System.Drawing.Point(8, 40)
Me.LblTypeNumBooks.Name = "LblTypeNumBooks"
Me.LblTypeNumBooks.Size = New System.Drawing.Size(112, 32)
Me.LblTypeNumBooks.TabIndex = 0
Me.LblTypeNumBooks.Text = "Type the number of books here ----->"
'
'LblTypeNumDaysLate
'
Me.LblTypeNumDaysLate.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LblTypeNumDaysLate.ForeColor = System.Drawing.Color.Blue
Me.LblTypeNumDaysLate.Location = New System.Drawing.Point(8, 88)
Me.LblTypeNumDaysLate.Name = "LblTypeNumDaysLate"
Me.LblTypeNumDaysLate.Size = New System.Drawing.Size(112, 32)
Me.LblTypeNumDaysLate.TabIndex = 1
Me.LblTypeNumDaysLate.Text = "Type the number of days late ------>"
'
'LblShowFines
'
Me.LblShowFines.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LblShowFines.Location = New System.Drawing.Point(336, 56)
Me.LblShowFines.Name = "LblShowFines"
Me.LblShowFines.Size = New System.Drawing.Size(144, 32)
Me.LblShowFines.TabIndex = 2
Me.LblShowFines.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'LlbThankYou
'
Me.LlbThankYou.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LlbThankYou.ForeColor = System.Drawing.Color.Blue
Me.LlbThankYou.Location = New System.Drawing.Point(136, 136)
Me.LlbThankYou.Name = "LlbThankYou"
Me.LlbThankYou.Size = New System.Drawing.Size(280, 23)
Me.LlbThankYou.TabIndex = 3
Me.LlbThankYou.Text = "Thanks for your prompt payment"
Me.LlbThankYou.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'TxtListNumBooks
'
Me.TxtListNumBooks.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.TxtListNumBooks.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TxtListNumBooks.Location = New System.Drawing.Point(144, 40)
Me.TxtListNumBooks.Multiline = True
Me.TxtListNumBooks.Name = "TxtListNumBooks"
Me.TxtListNumBooks.Size = New System.Drawing.Size(72, 20)
Me.TxtListNumBooks.TabIndex = 4
Me.TxtListNumBooks.Text = ""
Me.TxtListNumBooks.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TxtListNumDaysLate
'
Me.TxtListNumDaysLate.AllowDrop = True
Me.TxtListNumDaysLate.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.TxtListNumDaysLate.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TxtListNumDaysLate.Location = New System.Drawing.Point(144, 88)
Me.TxtListNumDaysLate.Multiline = True
Me.TxtListNumDaysLate.Name = "TxtListNumDaysLate"
Me.TxtListNumDaysLate.Size = New System.Drawing.Size(72, 20)
Me.TxtListNumDaysLate.TabIndex = 5
Me.TxtListNumDaysLate.Text = ""
Me.TxtListNumDaysLate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'BtnCalulateFines
'
Me.BtnCalulateFines.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BtnCalulateFines.Location = New System.Drawing.Point(224, 56)
Me.BtnCalulateFines.Name = "BtnCalulateFines"
Me.BtnCalulateFines.Size = New System.Drawing.Size(104, 32)
Me.BtnCalulateFines.TabIndex = 6
Me.BtnCalulateFines.Text = "Calculate Fine"
'
'BtnExit
'
Me.BtnExit.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BtnExit.Location = New System.Drawing.Point(392, 168)
Me.BtnExit.Name = "BtnExit"
Me.BtnExit.Size = New System.Drawing.Size(56, 23)
Me.BtnExit.TabIndex = 7
Me.BtnExit.Text = "E&xit"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(128, Byte))
Me.ClientSize = New System.Drawing.Size(488, 198)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.BtnExit, Me.BtnCalulateFines, Me.TxtListNumDaysLate, Me.TxtListNumBooks, Me.LlbThankYou, Me.LblShowFines, Me.LblTypeNumDaysLate, Me.LblTypeNumBooks})
Me.Name = "Form1"
Me.Text = "Library Fine Calulation"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click
End
End Sub
Private Sub LblShowFines_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LblShowFines.Click
End Sub
Private Sub BtnCalulateFines_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCalulateFines.Click
Dim sum As Double
sum = CDbl(TxtListNumBooks.Text) * 0.1 * CDbl(TxtListNumDaysLate.Text)
LblShowFines.Text = "Your total fine is: " & CStr(FormatCurrency(sum))
LblShowFines.BorderStyle = BorderStyle.FixedSingle
End Sub
Private Sub TxtListNumBooks_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtListNumBooks.TextChanged
TxtListNumBooks.TextAlign = HorizontalAlignment.Center
End Sub
Private Sub TxtListNumDaysLate_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtListNumDaysLate.TextChanged
TxtListNumDaysLate.TextAlign = HorizontalAlignment.Center
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub LblTypeNumBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LblTypeNumBooks.Click
End Sub
End Class