Beruflich Dokumente
Kultur Dokumente
You want to write code that removes a form from the screen, but still be
able to access controls on that form, how do you accomplish this?
Me.Hide()
17. You have written a function, named InRange. This function determines whe
ther a value is within a range of numbers. You call the function from code in on
ly one form. Do you store the function in the Form or Standard Module?
Standard Module.
For questions 31 through 40, please select the most correct answer.
32. Array bounds checking occurs at (A)
a. Run Time
b. Design Time
c. Break Time
d. All of the Above
33. This is the lower subscript of an array. (C)
a. 1
b. {}
c. 0
d. -1
34. This property causes a form to be displayed on top of all other currentl
y displayed forms. (A)
a. TopMost
b. Top
c. OnTop
d. Front
35. Which event of the Menu Item Object is most commonly used to execute cod
e? (B)
a. Popup
b. Click
c. Select
d. Perform
36. To create a separator bar in a Menu you would use what? (B)
a. underscore
b. hyphen
c. space
d. asterisk
37. Just before a form is initially displayed, this event is triggered.
(B)
a. Initial Display
b. Load
c. Display
d. Create
38. If you designate the Sub Procedure Main as the startup object, where mus
t it reside.
(A)
a. In the form that is also designated as the startup object
b. In the form’s Load procedure
c. In a standard module
d. In the frmMain module
39. The ___C____________________ method removes a form from the memory and t
he screen.
a. Remove
b. Delete
c. Close
d. Hide
40. Assuming that ofdOpen is an OpenFileDialog Control, the following statem
ent displays the dialog box.
(D)
a. ofd.Open.Display()
b. Show(ofdOpen)
c. ofdOpen.OpenDialog()
d. ofdOpen.ShowDialog()
41. Which of the following statements will close all the open forms and term
inate the application (C)
a. Me.Exit
b. Me.Close
c. Application.Exit
d. Application.Close
For questions 41 through 45 please write a line of code that will perform the de
scribed action.
42. Write a line of code that will Close the current form.
Me.Close()
43. Write a line of code to deselect a RadioButton named btnBlue.
btnBlue.Checked = False
44. Write a line of code that will declare and implicitly initialize an arra
y named MyArray to “Tom”, “Dick” and “Harry”
Dim strMyArray () As String = {“Tom”, “Dick”, “Harry”}
45. Write a line of code that will display a Color Dialog Box in modeless fo
rm. The name of the Color Dialog Box is ofdColor.
ofdColor.ShowDialog()
For questions 46 through 50 please indicate what is wrong with the code.
47. What is wrong with the following code?
Dim ManOfTheYear(1970 to 2000)
(1970 to 2000)
suppose not to have space on it.