image attached

1 answer below »
Answered Same DayFeb 07, 2021

Answer To: image attached

Ankit answered on Feb 07 2021
146 Votes
Output3.PNG
Validation1.PNG
Validation2.PNG
WinFormsApp1/.vs/WinFormsApp1/DesignTimeBuild/.dtbcache.v2
WinFormsApp1/.vs/WinFormsApp1/v16/.suo
WinFormsApp1/WinFormsApp1/ApplicationEvents.vb
Imports Microsoft.VisualBasic.ApplicationServices
Namespace My
' The following events are available for MyApplication:
' Startup: Raised when the application starts, before the startup form is created.
' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
' UnhandledException: Raised if the application encounters an unhandled exception.
' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
' **NEW** ApplyHighDpiMode: Raised when the app
lication queries the HighDpiMode to set it for the application.
' Example:
' Private Sub MyApplication_ApplyHighDpiMode(sender As Object, e As ApplyHighDpiModeEventArgs) Handles Me.ApplyHighDpiMode
' e.HighDpiMode = HighDpiMode.PerMonitorV2
' End Sub
Partial Friend Class MyApplication
End Class
End Namespace
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/ref/WinFormsApp1.dll
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.deps.json
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"WinFormsApp1/1.0.0": {
"runtime": {
"WinFormsApp1.dll": {}
}
}
}
},
"libraries": {
"WinFormsApp1/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.dll
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.exe
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.pdb
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.runtimeconfig.dev.json
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\ankit\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\ankit\\.nuget\\packages"
]
}
}
WinFormsApp1/WinFormsApp1/bin/Debug/net5.0-windows/WinFormsApp1.runtimeconfig.json
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "5.0.0"
}
}
}
WinFormsApp1/WinFormsApp1/Form1.Designer.vb
_
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)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
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.Air_RadioButton = New System.Windows.Forms.RadioButton()
Me.Water_RadioButton = New System.Windows.Forms.RadioButton()
Me.Steel_RadioButton = New System.Windows.Forms.RadioButton()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.Label2 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Air_RadioButton
'
Me.Air_RadioButton.AutoSize = True
Me.Air_RadioButton.Location = New System.Drawing.Point(169, 81)
Me.Air_RadioButton.Name = "Air_RadioButton"
Me.Air_RadioButton.Size = New System.Drawing.Size(40, 19)
Me.Air_RadioButton.TabIndex = 0
Me.Air_RadioButton.Text = "Air"
Me.Air_RadioButton.UseVisualStyleBackColor = True
'
'Water_RadioButton
'
Me.Water_RadioButton.AutoSize = True
Me.Water_RadioButton.Location = New System.Drawing.Point(169, 122)
Me.Water_RadioButton.Name = "Water_RadioButton"
Me.Water_RadioButton.Size = New System.Drawing.Size(56, 19)
Me.Water_RadioButton.TabIndex = 1
Me.Water_RadioButton.Text = "Water"
Me.Water_RadioButton.UseVisualStyleBackColor = True
'
'Steel_RadioButton
'
Me.Steel_RadioButton.AutoSize = True
Me.Steel_RadioButton.Location = New System.Drawing.Point(169, 166)
Me.Steel_RadioButton.Name = "Steel_RadioButton"
Me.Steel_RadioButton.Size = New System.Drawing.Size(50, 19)
Me.Steel_RadioButton.TabIndex = 2
Me.Steel_RadioButton.Text = "Steel"
Me.Steel_RadioButton.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(169, 211)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 23)
Me.TextBox1.TabIndex = 3
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(10, 214)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(137, 15)
Me.Label1.TabIndex = 4
Me.Label1.Text = "Enter the distance in feet"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(168, 290)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 6
Me.Button1.Text = "Submit"
Me.Button1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(284, 290)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(75, 23)
Me.Button2.TabIndex = 7
Me.Button2.Text = "Exit"
Me.Button2.UseVisualStyleBackColor = True
'
'Label3
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(168, 52)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(180, 15)
Me.Label2.TabIndex = 8
Me.Label2.Text = "Select any one of below Medium"
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(455, 338)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Air_RadioButton)
Me.Controls.Add(Me.Water_RadioButton)
Me.Controls.Add(Me.Steel_RadioButton)
Me.Name = "Form1"
Me.Text = "Speed of Sound"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Air_RadioButton As RadioButton
Friend WithEvents Water_RadioButton As RadioButton
Friend WithEvents Steel_RadioButton As RadioButton
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents Label2 As Label
Friend WithEvents Button1 As Button
Friend WithEvents Button2 As Button
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Answer As Decimal
If TextBox1.TextLength <= 0 Then
MsgBox("Enter Distance Value")
Else
If Not IsNumeric(TextBox1.Text) Then
MsgBox("Enter only Numeric Value")
Else
If TextBox1.Text > 0 Then
If Air_RadioButton.Checked = True Then
Answer = TextBox1.Text / 1100
MsgBox("Speed of Sound = " & Decimal.Round(Answer, 2) & " seconds")
ElseIf Water_RadioButton.Checked = True Then
Answer = TextBox1.Text / 4900
MsgBox("Speed of Sound = " & Decimal.Round(Answer, 2) & " seconds")
ElseIf Steel_RadioButton.Checked = True Then
Answer = TextBox1.Text / 16400
MsgBox("Speed of Sound = " & Decimal.Round(Answer, 2) & " seconds")
Else
MsgBox("Please Select...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here