0% found this document useful (0 votes)
53 views1 page

Exercise 17

This code defines a class with a button click event handler that displays different messages to a user based on text entered for whether their computer beeps and hard drive spins. It checks the values of two text boxes for "Y" or "N", then shows a corresponding message about whether to contact support, check drive contacts, bring it to a repair center, or check speaker connections.

Uploaded by

api-307933689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views1 page

Exercise 17

This code defines a class with a button click event handler that displays different messages to a user based on text entered for whether their computer beeps and hard drive spins. It checks the values of two text boxes for "Y" or "N", then shows a corresponding message about whether to contact support, check drive contacts, bring it to a repair center, or check speaker connections.

Uploaded by

api-307933689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise 17

Public Class Form1


Private Sub btnWhatToDo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnWhatToDo.Click
Dim beep As String = txtComputerBeep.Text
Dim spin As String = txtHardDriveSpin.Text
If beep = "Y" And spin = "Y" Then
MessageBox.Show("Contact tech Support", "Help", MessageBoxButtons.OKCancel)
ElseIf beep = "Y" And spin = "N" Then
MessageBox.Show("Check Drive Contacts", "Help", MessageBoxButtons.OKCancel)
ElseIf beep = "N" And spin = "N" Then
MessageBox.Show("Bring computer to repair center.", "Help",
MessageBoxButtons.OKCancel)
ElseIf beep = "N" And spin = "Y" Then
MessageBox.Show("Check the speaker connections.", "Help",
MessageBoxButtons.OKCancel)
End If
End Sub
End Class

You might also like