Question: Problem 1 Given the below event procedure, answer the following questions: Which control does the procedure respond to? b) If you type 13 into the

Problem 1 Given the below event procedure, answer the following questions: Which control does the procedure respond to? b) If you type 13 into the "n_val", what are the values assigned to List_col? c) Add a sanity check section to the beginning of the code to make sure that entry into "n_val" is a numeric positive integer value. Otherwise report an appropriate error message. d) Show how to modify this procedure such that it gets activated when the user pushes Enter key in n_val box Private Sub BT_Calc(sender As Object, e As EventArgs) Handles BT_Calc.Cliclk Sanity Check Dim n As Long n Val(n_val.Text) List_col.Items.Clear() List_col.ltems.Add(Str(n)) Do While n>1 If n /2- Int(n 2) Then Else End If List_col.Items.Add(Str(n)) Loop End Sub
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
