Program needs to be written in Visual Basic. Thank you Create a project to input
ID: 3875835 • Letter: P
Question
Program needs to be written in Visual Basic. Thank you
Create a project to input boat chartering and produce a summary report showing total revenue, number of charters, and average hours per charter. User will input party name & hours wanted, select yacht type & length (dropdown combo boxes), then cost will be calculated and displayed with OK button. Menu bar sample with hotkeys & shortcuts.
Ability to: add/remove a yacht type, list count of types, print a list/report of all types. Summary Report includes: # charters, total revenue, average hours chartered, and programmer name. Yacht Type Report will list the yacht types in the combo box with programmer name and title at top. Refer to the included diagram.
Yacht Types C& C Catalina Hobie Coronado Ranger Excalibur Wavelength Hans ChristianExplanation / Answer
Form1.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
<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
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip
Me.FileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.PrintSummaryToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.PrintYachtTypesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.EditToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ClearForNextCharterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator
Me.AddYachtTypeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.RemoveYachtTypeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.DisplayCountOfYachtTypesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.HelpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.AboutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.grpYachtInfo = New System.Windows.Forms.GroupBox
Me.cmbYachtLength = New System.Windows.Forms.ComboBox
Me.lblYachtLength = New System.Windows.Forms.Label
Me.lblYachtType = New System.Windows.Forms.Label
Me.cmbYachtType = New System.Windows.Forms.ComboBox
Me.txtResponsibleParty = New System.Windows.Forms.TextBox
Me.txtHoursWorked = New System.Windows.Forms.TextBox
Me.lblRespParty = New System.Windows.Forms.Label
Me.lblHoursChartered = New System.Windows.Forms.Label
Me.lblPriceOfCharter = New System.Windows.Forms.Label
Me.txtCalculatedPrice = New System.Windows.Forms.TextBox
Me.btnOk = New System.Windows.Forms.Button
Me.btnClear = New System.Windows.Forms.Button
Me.PrintDialog1 = New System.Windows.Forms.PrintDialog
Me.printSummaryPage = New System.Drawing.Printing.PrintDocument
Me.PrintPreviewDialog1 = New System.Windows.Forms.PrintPreviewDialog
Me.printYachtPage = New System.Drawing.Printing.PrintDocument
Me.PrintPreviewDialog2 = New System.Windows.Forms.PrintPreviewDialog
Me.MenuStrip1.SuspendLayout()
Me.grpYachtInfo.SuspendLayout()
Me.SuspendLayout()
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FileToolStripMenuItem, Me.EditToolStripMenuItem, Me.HelpToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(491, 24)
Me.MenuStrip1.TabIndex = 3
Me.MenuStrip1.Text = "MenuStrip1"
Me.FileToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.PrintSummaryToolStripMenuItem, Me.PrintYachtTypesToolStripMenuItem, Me.ToolStripSeparator1, Me.ExitToolStripMenuItem})
Me.FileToolStripMenuItem.Name = "FileToolStripMenuItem"
Me.FileToolStripMenuItem.Size = New System.Drawing.Size(35, 20)
Me.FileToolStripMenuItem.Text = "&File"
Me.PrintSummaryToolStripMenuItem.Name = "PrintSummaryToolStripMenuItem"
Me.PrintSummaryToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.PrintSummaryToolStripMenuItem.Text = "&Print Summary"
Me.PrintYachtTypesToolStripMenuItem.Name = "PrintYachtTypesToolStripMenuItem"
Me.PrintYachtTypesToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.PrintYachtTypesToolStripMenuItem.Text = "P&rint Yacht Types"
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
Me.ToolStripSeparator1.Size = New System.Drawing.Size(166, 6)
Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem"
Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.ExitToolStripMenuItem.Text = "E&xit"
Me.EditToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ClearForNextCharterToolStripMenuItem, Me.ToolStripSeparator2, Me.AddYachtTypeToolStripMenuItem, Me.RemoveYachtTypeToolStripMenuItem, Me.DisplayCountOfYachtTypesToolStripMenuItem})
Me.EditToolStripMenuItem.Name = "EditToolStripMenuItem"
Me.EditToolStripMenuItem.Size = New System.Drawing.Size(37, 20)
Me.EditToolStripMenuItem.Text = "&Edit"
Me.ClearForNextCharterToolStripMenuItem.Name = "ClearForNextCharterToolStripMenuItem"
Me.ClearForNextCharterToolStripMenuItem.Size = New System.Drawing.Size(226, 22)
Me.ClearForNextCharterToolStripMenuItem.Text = "&Clear for Next Charter"
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
Me.ToolStripSeparator2.Size = New System.Drawing.Size(223, 6)
Me.AddYachtTypeToolStripMenuItem.Name = "AddYachtTypeToolStripMenuItem"
Me.AddYachtTypeToolStripMenuItem.Size = New System.Drawing.Size(226, 22)
Me.AddYachtTypeToolStripMenuItem.Text = "Add &Yacht Type"
Me.RemoveYachtTypeToolStripMenuItem.Name = "RemoveYachtTypeToolStripMenuItem"
Me.RemoveYachtTypeToolStripMenuItem.Size = New System.Drawing.Size(226, 22)
Me.RemoveYachtTypeToolStripMenuItem.Text = "&Remove Yacht Type"
Me.DisplayCountOfYachtTypesToolStripMenuItem.Name = "DisplayCountOfYachtTypesToolStripMenuItem"
Me.DisplayCountOfYachtTypesToolStripMenuItem.Size = New System.Drawing.Size(226, 22)
Me.DisplayCountOfYachtTypesToolStripMenuItem.Text = "&Display Count of Yacht Types"
Me.HelpToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AboutToolStripMenuItem})
Me.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"
Me.HelpToolStripMenuItem.Size = New System.Drawing.Size(40, 20)
Me.HelpToolStripMenuItem.Text = "&Help"
Me.AboutToolStripMenuItem.Name = "AboutToolStripMenuItem"
Me.AboutToolStripMenuItem.Size = New System.Drawing.Size(114, 22)
Me.AboutToolStripMenuItem.Text = "&About"
Me.grpYachtInfo.Controls.Add(Me.cmbYachtLength)
Me.grpYachtInfo.Controls.Add(Me.lblYachtLength)
Me.grpYachtInfo.Controls.Add(Me.lblYachtType)
Me.grpYachtInfo.Controls.Add(Me.cmbYachtType)
Me.grpYachtInfo.Location = New System.Drawing.Point(257, 27)
Me.grpYachtInfo.Name = "grpYachtInfo"
Me.grpYachtInfo.Size = New System.Drawing.Size(222, 100)
Me.grpYachtInfo.TabIndex = 3
Me.grpYachtInfo.TabStop = False
Me.grpYachtInfo.Text = "Yacht Information"
Me.cmbYachtLength.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbYachtLength.FormattingEnabled = True
Me.cmbYachtLength.Items.AddRange(New Object() {"22", "24", "30", "32", "36", "38", "45"})
Me.cmbYachtLength.Location = New System.Drawing.Point(95, 61)
Me.cmbYachtLength.Name = "cmbYachtLength"
Me.cmbYachtLength.Size = New System.Drawing.Size(121, 21)
Me.cmbYachtLength.Sorted = True
Me.cmbYachtLength.TabIndex = 1
Me.lblYachtLength.AutoSize = True
Me.lblYachtLength.Location = New System.Drawing.Point(6, 64)
Me.lblYachtLength.Name = "lblYachtLength"
Me.lblYachtLength.Size = New System.Drawing.Size(83, 13)
Me.lblYachtLength.TabIndex = 2
Me.lblYachtLength.Text = "Length of Yacht"
Me.lblYachtType.AutoSize = True
Me.lblYachtType.Location = New System.Drawing.Point(6, 22)
Me.lblYachtType.Name = "lblYachtType"
Me.lblYachtType.Size = New System.Drawing.Size(74, 13)
Me.lblYachtType.TabIndex = 3
Me.lblYachtType.Text = "Type of Yacht"
Me.cmbYachtType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbYachtType.FormattingEnabled = True
Me.cmbYachtType.Items.AddRange(New Object() {"C & C", "Catalina", "Coronado", "Excalibur", "Hans Christian", "Hobie", "Ranger", "Wavelength"})
Me.cmbYachtType.Location = New System.Drawing.Point(95, 19)
Me.cmbYachtType.Name = "cmbYachtType"
Me.cmbYachtType.Size = New System.Drawing.Size(121, 21)
Me.cmbYachtType.Sorted = True
Me.cmbYachtType.TabIndex = 0
Me.txtResponsibleParty.Location = New System.Drawing.Point(127, 49)
Me.txtResponsibleParty.Name = "txtResponsibleParty"
Me.txtResponsibleParty.Size = New System.Drawing.Size(100, 20)
Me.txtResponsibleParty.TabIndex = 1
Me.txtHoursWorked.Location = New System.Drawing.Point(127, 88)
Me.txtHoursWorked.Name = "txtHoursWorked"
Me.txtHoursWorked.Size = New System.Drawing.Size(100, 20)
Me.txtHoursWorked.TabIndex = 2
Me.lblRespParty.AutoSize = True
Me.lblRespParty.Location = New System.Drawing.Point(12, 52)
Me.lblRespParty.Name = "lblRespParty"
Me.lblRespParty.Size = New System.Drawing.Size(95, 13)
Me.lblRespParty.TabIndex = 3
Me.lblRespParty.Text = "Responsible Party:"
Me.lblHoursChartered.AutoSize = True
Me.lblHoursChartered.Location = New System.Drawing.Point(12, 91)
Me.lblHoursChartered.Name = "lblHoursChartered"
Me.lblHoursChartered.Size = New System.Drawing.Size(87, 13)
Me.lblHoursChartered.TabIndex = 5
Me.lblHoursChartered.Text = "Hours Chartered:"
Me.lblPriceOfCharter.AutoSize = True
Me.lblPriceOfCharter.Location = New System.Drawing.Point(16, 156)
Me.lblPriceOfCharter.Name = "lblPriceOfCharter"
Me.lblPriceOfCharter.Size = New System.Drawing.Size(136, 13)
Me.lblPriceOfCharter.TabIndex = 6
Me.lblPriceOfCharter.Text = "Calculated Price of Charter:"
Me.txtCalculatedPrice.Location = New System.Drawing.Point(158, 153)
Me.txtCalculatedPrice.Name = "txtCalculatedPrice"
Me.txtCalculatedPrice.ReadOnly = True
Me.txtCalculatedPrice.Size = New System.Drawing.Size(100, 20)
Me.txtCalculatedPrice.TabIndex = 7
Me.btnOk.Location = New System.Drawing.Point(295, 150)
Me.btnOk.Name = "btnOk"
Me.btnOk.Size = New System.Drawing.Size(75, 23)
Me.btnOk.TabIndex = 4
Me.btnOk.Text = "&OK"
Me.btnOk.UseVisualStyleBackColor = True
Me.btnClear.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnClear.Location = New System.Drawing.Point(376, 150)
Me.btnClear.Name = "btnClear"
Me.btnClear.Size = New System.Drawing.Size(75, 23)
Me.btnClear.TabIndex = 5
Me.btnClear.Text = "C&lear"
Me.btnClear.UseVisualStyleBackColor = True
Me.PrintDialog1.UseEXDialog = True
Me.PrintPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)
Me.PrintPreviewDialog1.Enabled = True
Me.PrintPreviewDialog1.Icon = CType(resources.GetObject("PrintPreviewDialog1.Icon"), System.Drawing.Icon)
Me.PrintPreviewDialog1.Name = "PrintPreviewDialog1"
Me.PrintPreviewDialog1.Visible = False
Me.PrintPreviewDialog2.AutoScrollMargin = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog2.AutoScrollMinSize = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog2.ClientSize = New System.Drawing.Size(400, 300)
Me.PrintPreviewDialog2.Enabled = True
Me.PrintPreviewDialog2.Icon = CType(resources.GetObject("PrintPreviewDialog2.Icon"), System.Drawing.Icon)
Me.PrintPreviewDialog2.Name = "PrintPreviewDialog2"
Me.PrintPreviewDialog2.Visible = False
Me.AcceptButton = Me.btnOk
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnClear
Me.ClientSize = New System.Drawing.Size(491, 191)
Me.Controls.Add(Me.btnClear)
Me.Controls.Add(Me.btnOk)
Me.Controls.Add(Me.txtCalculatedPrice)
Me.Controls.Add(Me.lblPriceOfCharter)
Me.Controls.Add(Me.lblHoursChartered)
Me.Controls.Add(Me.lblRespParty)
Me.Controls.Add(Me.txtHoursWorked)
Me.Controls.Add(Me.txtResponsibleParty)
Me.Controls.Add(Me.grpYachtInfo)
Me.Controls.Add(Me.MenuStrip1)
Me.MainMenuStrip = Me.MenuStrip1
Me.MaximizeBox = False
Me.Name = "Form1"
Me.Text = "Yacht Chartering"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.grpYachtInfo.ResumeLayout(False)
Me.grpYachtInfo.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents FileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents EditToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HelpToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents grpYachtInfo As System.Windows.Forms.GroupBox
Friend WithEvents cmbYachtType As System.Windows.Forms.ComboBox
Friend WithEvents cmbYachtLength As System.Windows.Forms.ComboBox
Friend WithEvents lblYachtLength As System.Windows.Forms.Label
Friend WithEvents lblYachtType As System.Windows.Forms.Label
Friend WithEvents txtResponsibleParty As System.Windows.Forms.TextBox
Friend WithEvents txtHoursWorked As System.Windows.Forms.TextBox
Friend WithEvents lblRespParty As System.Windows.Forms.Label
Friend WithEvents lblHoursChartered As System.Windows.Forms.Label
Friend WithEvents lblPriceOfCharter As System.Windows.Forms.Label
Friend WithEvents txtCalculatedPrice As System.Windows.Forms.TextBox
Friend WithEvents PrintSummaryToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PrintYachtTypesToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ExitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ClearForNextCharterToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents AddYachtTypeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents RemoveYachtTypeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents DisplayCountOfYachtTypesToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents AboutToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents btnOk As System.Windows.Forms.Button
Friend WithEvents btnClear As System.Windows.Forms.Button
Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog
Friend WithEvents printSummaryPage As System.Drawing.Printing.PrintDocument
Friend WithEvents PrintPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog
Friend WithEvents printYachtPage As System.Drawing.Printing.PrintDocument
Friend WithEvents PrintPreviewDialog2 As System.Windows.Forms.PrintPreviewDialog
End Class
About.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class About
Inherits System.Windows.Forms.Form
<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
Friend WithEvents TableLayoutPanel As System.Windows.Forms.TableLayoutPanel
Friend WithEvents LogoPictureBox As System.Windows.Forms.PictureBox
Friend WithEvents LabelProductName As System.Windows.Forms.Label
Friend WithEvents LabelVersion As System.Windows.Forms.Label
Friend WithEvents LabelCompanyName As System.Windows.Forms.Label
Friend WithEvents TextBoxDescription As System.Windows.Forms.TextBox
Friend WithEvents OKButton As System.Windows.Forms.Button
Friend WithEvents LabelCopyright As System.Windows.Forms.Label
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(About))
Me.TableLayoutPanel = New System.Windows.Forms.TableLayoutPanel
Me.LogoPictureBox = New System.Windows.Forms.PictureBox
Me.LabelProductName = New System.Windows.Forms.Label
Me.LabelVersion = New System.Windows.Forms.Label
Me.LabelCopyright = New System.Windows.Forms.Label
Me.LabelCompanyName = New System.Windows.Forms.Label
Me.TextBoxDescription = New System.Windows.Forms.TextBox
Me.OKButton = New System.Windows.Forms.Button
Me.TableLayoutPanel.SuspendLayout()
CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
Me.TableLayoutPanel.ColumnCount = 2
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.0!))
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.0!))
Me.TableLayoutPanel.Controls.Add(Me.LogoPictureBox, 0, 0)
Me.TableLayoutPanel.Controls.Add(Me.LabelProductName, 1, 0)
Me.TableLayoutPanel.Controls.Add(Me.LabelVersion, 1, 1)
Me.TableLayoutPanel.Controls.Add(Me.LabelCopyright, 1, 2)
Me.TableLayoutPanel.Controls.Add(Me.LabelCompanyName, 1, 3)
Me.TableLayoutPanel.Controls.Add(Me.TextBoxDescription, 1, 4)
Me.TableLayoutPanel.Controls.Add(Me.OKButton, 1, 5)
Me.TableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill
Me.TableLayoutPanel.Location = New System.Drawing.Point(9, 9)
Me.TableLayoutPanel.Name = "TableLayoutPanel"
Me.TableLayoutPanel.RowCount = 6
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
Me.TableLayoutPanel.Size = New System.Drawing.Size(396, 258)
Me.TableLayoutPanel.TabIndex = 0
Me.LogoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill
Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"), System.Drawing.Image)
Me.LogoPictureBox.Location = New System.Drawing.Point(3, 3)
Me.LogoPictureBox.Name = "LogoPictureBox"
Me.TableLayoutPanel.SetRowSpan(Me.LogoPictureBox, 6)
Me.LogoPictureBox.Size = New System.Drawing.Size(124, 252)
Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.LogoPictureBox.TabIndex = 0
Me.LogoPictureBox.TabStop = False
Me.LabelProductName.Dock = System.Windows.Forms.DockStyle.Fill
Me.LabelProductName.Location = New System.Drawing.Point(136, 0)
Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
Me.LabelProductName.MaximumSize = New System.Drawing.Size(0, 17)
Me.LabelProductName.Name = "LabelProductName"
Me.LabelProductName.Size = New System.Drawing.Size(257, 17)
Me.LabelProductName.TabIndex = 0
Me.LabelProductName.Text = "Product Name"
Me.LabelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.LabelVersion.Dock = System.Windows.Forms.DockStyle.Fill
Me.LabelVersion.Location = New System.Drawing.Point(136, 25)
Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
Me.LabelVersion.MaximumSize = New System.Drawing.Size(0, 17)
Me.LabelVersion.Name = "LabelVersion"
Me.LabelVersion.Size = New System.Drawing.Size(257, 17)
Me.LabelVersion.TabIndex = 0
Me.LabelVersion.Text = "Version"
Me.LabelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.LabelCopyright.Dock = System.Windows.Forms.DockStyle.Fill
Me.LabelCopyright.Location = New System.Drawing.Point(136, 50)
Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
Me.LabelCopyright.MaximumSize = New System.Drawing.Size(0, 17)
Me.LabelCopyright.Name = "LabelCopyright"
Me.LabelCopyright.Size = New System.Drawing.Size(257, 17)
Me.LabelCopyright.TabIndex = 0
Me.LabelCopyright.Text = "Copyright"
Me.LabelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.LabelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill
Me.LabelCompanyName.Location = New System.Drawing.Point(136, 75)
Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(0, 17)
Me.LabelCompanyName.Name = "LabelCompanyName"
Me.LabelCompanyName.Size = New System.Drawing.Size(257, 17)
Me.LabelCompanyName.TabIndex = 0
Me.LabelCompanyName.Text = "Company Name"
Me.LabelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.TextBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill
Me.TextBoxDescription.Location = New System.Drawing.Point(136, 103)
Me.TextBoxDescription.Margin = New System.Windows.Forms.Padding(6, 3, 3, 3)
Me.TextBoxDescription.Multiline = True
Me.TextBoxDescription.Name = "TextBoxDescription"
Me.TextBoxDescription.ReadOnly = True
Me.TextBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.TextBoxDescription.Size = New System.Drawing.Size(257, 123)
Me.TextBoxDescription.TabIndex = 0
Me.TextBoxDescription.TabStop = False
Me.TextBoxDescription.Text = resources.GetString("TextBoxDescription.Text")
Me.OKButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.OKButton.Location = New System.Drawing.Point(318, 232)
Me.OKButton.Name = "OKButton"
Me.OKButton.Size = New System.Drawing.Size(75, 23)
Me.OKButton.TabIndex = 0
Me.OKButton.Text = "&OK"
Me.AcceptButton = Me.OKButton
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.OKButton
Me.ClientSize = New System.Drawing.Size(414, 276)
Me.Controls.Add(Me.TableLayoutPanel)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "About"
Me.Padding = New System.Windows.Forms.Padding(9)
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "About"
Me.TableLayoutPanel.ResumeLayout(False)
Me.TableLayoutPanel.PerformLayout()
CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
End Class
About.vb
Public NotInheritable Class About
Private Sub AboutBox1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ApplicationTitle As String
If My.Application.Info.Title <> "" Then
ApplicationTitle = My.Application.Info.Title
Else
ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
Me.Text = String.Format("About {0}", ApplicationTitle)
Me.LabelProductName.Text = My.Application.Info.ProductName
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
Me.LabelCopyright.Text = My.Application.Info.Copyright
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
Me.TextBoxDescription.Text = My.Application.Info.Description
End Sub
Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
Me.Close()
End Sub
End Class
AddType.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class AddType
Inherits System.Windows.Forms.Form
<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
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.btnOK = New System.Windows.Forms.Button
Me.btnCancel = New System.Windows.Forms.Button
Me.lblEnterYachtType = New System.Windows.Forms.Label
Me.txtEnterYacht = New System.Windows.Forms.TextBox
Me.SuspendLayout()
Me.btnOK.Location = New System.Drawing.Point(59, 74)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 0
Me.btnOK.Text = "&OK"
Me.btnOK.UseVisualStyleBackColor = True
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(140, 74)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 1
Me.btnCancel.Text = "&Cancel"
Me.btnCancel.UseVisualStyleBackColor = True
Me.lblEnterYachtType.AutoSize = True
Me.lblEnterYachtType.Location = New System.Drawing.Point(93, 9)
Me.lblEnterYachtType.Name = "lblEnterYachtType"
Me.lblEnterYachtType.Size = New System.Drawing.Size(93, 13)
Me.lblEnterYachtType.TabIndex = 2
Me.lblEnterYachtType.Text = "Enter Yacht Type:"
Me.txtEnterYacht.Location = New System.Drawing.Point(59, 35)
Me.txtEnterYacht.Name = "txtEnterYacht"
Me.txtEnterYacht.Size = New System.Drawing.Size(156, 20)
Me.txtEnterYacht.TabIndex = 3
Me.AcceptButton = Me.btnOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(269, 115)
Me.Controls.Add(Me.txtEnterYacht)
Me.Controls.Add(Me.lblEnterYachtType)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnOK)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "AddType"
Me.Text = "Add Yacht Type"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents lblEnterYachtType As System.Windows.Forms.Label
Friend WithEvents txtEnterYacht As System.Windows.Forms.TextBox
End Class
AddType.vb
Public Class AddType
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
With Me
If .txtEnterYacht.Text = "" Then
MessageBox.Show("Please Enter a yacht type.", "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
If Form1.cmbYachtType.Items.Contains(.txtEnterYacht.Text) Then
MessageBox.Show("This Yacht Type already exists!!", "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
.txtEnterYacht.Focus()
End If
Form1.cmbYachtType.Items.Add(.txtEnterYacht.Text)
.txtEnterYacht.Text = ""
.txtEnterYacht.Focus()
End With
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
With Me
Me.Close()
Me.Dispose()
End With
End Sub
End Class
DeleteType.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class DeleteType
Inherits System.Windows.Forms.Form
<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
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.lblEnterYachtType = New System.Windows.Forms.Label
Me.btnCancel = New System.Windows.Forms.Button
Me.btnOK = New System.Windows.Forms.Button
Me.cmbYachtType = New System.Windows.Forms.ComboBox
Me.SuspendLayout()
Me.lblEnterYachtType.AutoSize = True
Me.lblEnterYachtType.Location = New System.Drawing.Point(96, 9)
Me.lblEnterYachtType.Name = "lblEnterYachtType"
Me.lblEnterYachtType.Size = New System.Drawing.Size(98, 13)
Me.lblEnterYachtType.TabIndex = 6
Me.lblEnterYachtType.Text = "Select Yacht Type:"
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(143, 74)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 5
Me.btnCancel.Text = "&Cancel"
Me.btnCancel.UseVisualStyleBackColor = True
Me.btnOK.Location = New System.Drawing.Point(62, 74)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 4
Me.btnOK.Text = "&OK"
Me.btnOK.UseVisualStyleBackColor = True
Me.cmbYachtType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbYachtType.FormattingEnabled = True
Me.cmbYachtType.Items.AddRange(New Object() {"C & C", "Catalina", "Coronado", "Excalibur", "Hans Christian", "Hobie", "Ranger", "Wavelength"})
Me.cmbYachtType.Location = New System.Drawing.Point(86, 36)
Me.cmbYachtType.Name = "cmbYachtType"
Me.cmbYachtType.Size = New System.Drawing.Size(121, 21)
Me.cmbYachtType.Sorted = True
Me.cmbYachtType.TabIndex = 7
Me.AcceptButton = Me.btnOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(279, 124)
Me.Controls.Add(Me.cmbYachtType)
Me.Controls.Add(Me.lblEnterYachtType)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnOK)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "DeleteType"
Me.Text = "Delete Yacht Type"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents lblEnterYachtType As System.Windows.Forms.Label
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents cmbYachtType As System.Windows.Forms.ComboBox
End Class
DeleteType.vb
Public Class DeleteType
Private Sub DeleteType_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With Me
.cmbYachtType.Items.Clear()
For index As Integer = 0 To Form1.cmbYachtType.Items.Count - 1
.cmbYachtType.Items.Add(Form1.cmbYachtType.Items.Item(index))
Next
.cmbYachtType.Focus()
End With
End Sub
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
With Me
If .cmbYachtType.Text = "" Then
MessageBox.Show("Please select a Yacht Type to remove!", "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
.cmbYachtType.Focus()
End If
Form1.cmbYachtType.Items.Remove(.cmbYachtType.Text)
cmbYachtType.Items.Remove(.cmbYachtType.Text)
.cmbYachtType.Text = ""
.cmbYachtType.Focus()
End With
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.Close()
Me.Dispose()
End Sub
End Class
due to limited character i cant able to post Form1.vb file
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.