1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
trasher [3.6K]
4 years ago
13

Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to

the GUI in the starter program. A text box to accept the part number (Only one is allowed A1B) Note the user may enter spaces before or after the part number and may enter the letters in lower or upper case. You program must accommodate that.

Computers and Technology
1 answer:
Ugo [173]4 years ago
5 0

Answer:

Imports System.Text.RegularExpressions

Public Class Form2

   Private Shared Function Num1(ByVal val As String) As Integer

       Dim retrnVal As String = String.Empty

       Dim collect As MatchCollection = Regex.Matches(val, "\d+")

       For Each mat As Match In collect

           retrnVal += mat.ToString()

       Next

       Return Convert.ToInt32(retrnVal)

   End Function

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

       TextBox1.Text = Num1(TextBox1.Text)

       Dim Total As Integer = 0

       Dim A1b As Integer = Convert.ToInt32(TextBox1.Text)

       Label1.Text = 250

       Label2.Text = 25

       If Convert.ToInt32(TextBox1.Text) = A1b Then

           If Convert.ToInt16(Label1.Text) < 10 Then

               Total = 10.5 * Convert.ToInt16(Label1.Text)

           Else

               Total = 8.75 * Convert.ToInt16(Label1.Text)

           End If

           If CheckBox1.Checked Then

               Total = Total + 10

           Else

               Total = Total + 5

           End If

           TextBox2.Text = Convert.ToString(Total)

       End If

End Sub

Explanation:

Please check the answer section and the attachment. Also, please check the method. We have used the regular expression over there. And we have imported the regularexpression library for that. And this is to ensure we can read integer from textbox no matter whether the user inputs empty spaces or characters in lower and upper case in between.

You might be interested in
__________ may be defined as the application of methods and means to ensure that test results are reliable and valid, and errors
kow [346]

Answer:

Quality assurance

Explanation:

8 0
3 years ago
30 point!! Looking at your Personal Fact Sheet, do you see any areas that may need improvement? In which areas do you have the m
Paul [167]
Can you please provide us with a photo of your personal fact sheet?
7 0
4 years ago
Read 2 more answers
Email is the most common function used in Outlook. Use the drop-down menus to complete the following sentences. By default, the
Olegator [25]
1. Inbox 2. Drafts 3. in the bold font 4. Reading. Hope this helps!
3 0
3 years ago
Read 2 more answers
A _______ is the most commonly used input device.
nirvana33 [79]
The answer is B.Keyboard
4 0
3 years ago
Read 2 more answers
PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS IS A PRETTY SIMPLE QUESTION, BUT FOR SOME REASON THEY'RE GIVING ME QUESTIONS
vichka [17]

I think it's C because he upgraded from a slower one

5 0
3 years ago
Other questions:
  • Într-o școală sunt n clase, fiecare având un număr diferit de elevi. Școală primește m pachete cu cărți, fiecare cu un număr dif
    15·1 answer
  • What does cramming to hand in an assignment
    10·1 answer
  • In terms of in-house custom engines versus third-party engines (like Unity), what has changed today from decades ago, and why?
    8·1 answer
  • Hi weegy, what is the latest android os?
    9·1 answer
  • Which of the following identifies the patterns used for each data series in a chart?
    12·1 answer
  • Application servers are usually grouped into two types: page-based and _____ systems.
    6·1 answer
  • Explica porque se afirma que la existencia de estaciones cambia las combstumbres y la cultura​
    14·1 answer
  • Select the correct answer
    8·1 answer
  • How has the widespread shift to remote work caused businesses to reconsider their use of Extended Reality (XR)?.
    13·1 answer
  • Select the four tactics that cyber criminals use for stealing information from the list below.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!