Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

     You are here -- http://www.myVBnotes.netfirms.com    

.Home ] Up ] [ Memo ]


Test Questions

Jump to question:

[ 10 ]

[ 20 ]

[ 30 ]

[ 40 ]

[ 50 ]

 

 

1.

Which of the following symbols represents the For Each...Next loop in a flowchart?
.
a diamond
b hexagon
c oval
d parallelogram
e rectangle
. .
2. Assume that a form contains four labels, two text boxes and two buttons.  How many times will the computer process the Debug.WriteLine instruction in the following code?

 

Dim intX As Integer

   For intX = 0 To Controls.Count - 1

      Debug.WriteLine(Controls.Item(intX).Name)

   Next intX

 

a 0
b 1
c 7
d 8
e 9
.
3. What is the value of intX when the loop in Question 2 stops?
.
a 1
b 5
c 7
d 8
e 9
. .
4. Assume that a form contains four labels, two text boxes and two buttons.  How many times will the computer process the Debug.WriteLine instruction in the following code?

 

Dim intX As Integer, objButton As Button

   For intX = 0 To Controls.Count - 1

      If TypeOf Controls.Item(intX) Is Button Then

         objButton = Controls.Item(intX)

         Debug.WriteLine(objButton.Name)

      End If

   Next intX

 

a 0
b 1
c 2
d 7
e 8
.
5. Which of the following clauses indicates that the loop should be performed for each object in the ButtonCollection?
.
a For intX = 0 To ButtonCollection.Count
b For intX = 0 To ButtonCollection.Count - 1
c For intX = 1 To ButtonCollection.Count
d For intX = 1 To ButtonCollection.Count - 1
e Both b and c
.

Back to Top

6. Which of the following clauses indicates that the loop should be performed for each object in the LabelCollection?
.
a For Each objLabel in LabelCollection
b For Each objLabel in LabelCollection.Count
c For Each objLabel in LabelCollection.Count - 1
d For objLabel in LabelCollection
e For All objLabel in LabelCollection
.
7. Which of the following statements adds the NameTextBox control to the TextBoxCollection?
.
a Add.TextBoxCollection(Me.NameTextBox)
b Add(TextBoxCollection.Me.NameTextBox)
c TextBoxCollection.Add(Me.NameTextBox)
d TextBoxCollection(Add Me.NameTextBox)
e TextBoxCollection.NameTextBox.Add()
.
8. Which of the following statements remove the first text box from the TextBoxCollection?
.
a Remove.TextBoxCollection(0)
b Remove.(TextBoxCollection(1))
c Remove.TextBoxCollection(1)
d TextBoxCollection.Remove(8)
e TextBoxCollection.Remove(1)
.
9. Assume that an application contains two collections named LabelCollection and TextBoxCollection.  Which of the following statements associates the idNameLabel control (which is contained in the LabelCollection) with the FirstNameTextBox (which is contained in the TextBoxCollection)?
.
a Me.FirstNameTextBox.Add.TextBoxCollection("idNameLabel")
b Me.idNameLabel.Add.LabelCollection("FirstNameTextBox")
c TextBoxCollection.Add("idNameLabel", Me.FirstNameTextBox)
d TextBoxCollection.Add(Me.FirstNameTextBox, "idNameLabel")
e Both a and b
.
10. A unique number, called _______, is assigned to each object in a collection.
.
a an address
b a key
c an object number
d an object value
e an index
.

Back to Top

11. The index of the first control contained in the Controls collection is ___________
.
a 0
b 1
.
12. Assume that a procedure contains the statement Dim ButtonCollection As New Collection().  The first button contained in the ButtonCollection has an index of __________
.
a 0
b 1
.
13. Collections that have corresponding elements are called ________ collections.
.
a associated
b coordinated
c coupled
d matching
e parallel
.
14. To prevent an object from responding to user-generated events, set the object's ______ property to False.
.
a Enabled
b EventEnabled
c Prevent
d Response
e User
.
15. Assume that a procedure contains the following three lines of code:

 

Dim ButtonCollection As New Collection()

ButtonCollection.Add(Me.CalcButton, "Calculate")

ButtonCollection.Add(Me.ExitButton, "Exit")

      

Which of the following can be used to refer to the first button in the ButtonCollection?
.
a ButtonCollection.Item(0)
b ButtonCollection.Item(1)
c ButtonCollection.Item("Calculate")
d Both a and c
e Both b and c
.

Back to Top

16. Explain the difference between the standard division operator and the integer division operator?
..
17. ______________ are memory locations in which you temporarily store information.
.
a Boxes
b Literal constants
c Named constants
d Variables
e Both c and d
.
18. Which of the following are valid variable names?
.
a dec94Income
b decIncome
c decInc_94
d decIncomeTax
e All of the above
.
19. Which of the following is the correct data type to use for a variable that will always contain a whole number less than 50 000?
.
a Decimal
b Integer
c Long
d Single
e Object
.
20.... A(n) ________________ variable is known only to the procedure in which it is declared.
.
a current
b event
c form-level
d local
e None of the above
.

Back to Top

21. A _________________ is a data item whose value does not change while the program is running.
.
a literal constant
b literal variable
c named constant
d symbolic variable
e variable
.
22. A ___________ is a memory location whose value can change while the program is running.
.
a literal constant
b literal variable
c named constant
d symbolic variable
e variable
.
23. A ____________ is a memory location whose value cannot change while the program is running
.
a literal constant
b literal variable
c named constant
d symbolic variable
e variable
.
24. If you do not provide a data type in a variable declaration statement, Visual Basic .NET assigns the ______ data type to the variable
.
a decimal
b integer
c object
d string
e none of the above
.
25. Many programmers begin a form-level variable's name with the ___________
.
a.. letter f
b letter m
c letters fl
d. letters frm
e letters mod
.

Back to Top

26. Data stored in a variable can be processed much faster than data stored in the property of a control
.
a True
b False
.
27. A _____________ is a pattern that Visual Studio .NET uses to create solutions and projects
.
a design
b profile
c solution
d template
e user interface
.
28. A ____________ is a container that stores the projects and files for an entire application
.
a form file
b profile
c solution
d template
e none of the above
.
29. You use the _____________ window to set the characteristics that control an object's appearnce and behaviour
.
a Characteristics
b Object
c Properties
d Toolbox
e Windows Form Designer
.
30. The _____________ window lists the projects and files included in a solution
.
a object
b project
c properties
d solution explorer
e windows form designer
.

Back to Top

31. Solutions files in Visual Studio .NET have a(n) _______________ extension on their filenames
.
a .frm
b .prg
c .sln
d .src
e .vb
.
32. Which of the following statements is false?
.
a You can auto-hide a window by clicking the vertical thumb-tack button on its title bar
b An auto-hidden window appears as a tab on the edge of the IDE
c You temporarily display an auto-hidden window by placing your mouse pointer on its tab
d You permanently display an auto-hidden window by clicking the horizontal thumb-tack on its title bar
e None of the above
.
33. Visual Basic .NET source files have a(n) ______________ extension on their filenames
.
a .frm
b .prg
c .sln
d .src
e .vb
.
34. The code that creates a Windows Form object is stored in a file whose filename extension is _________
.
a .frm
b .prg
c .sln
d .src
e .vb
.
35. The ______________ property controls the text appearing in the title bar on a Windows Form object
.
a Caption
b FormCaption
c Text
d Title
e TitleBar
.

Back to Top

36. You give an object a more meaningful name by setting the object's ___________ property
.
a Application
b Caption
c Form
d Name
e Text
.
37. You can size a Windows Form object by ____________
.
a dragging its sizing handles
b setting its Height property
c setting its Size property
d setting its Width property
e All of the above
.
38. The _____________ property determines the position of a Windows Form object when it first appears
.
a InitialLocation
b Location
c Start
d StartLocation
e StartPosition
.
39. The ______________ property allows you to display a graphic as the background of a Windows Form object
.
a BackgroundImage
b BackgroundPicture
c GraphicBackground
d IconBackground
e Image
.
40. When you close a solution, all projects and files included in the solution are also closed
.
a True
b False
.

Back to Top

41. A project can contain one or more Windows Form objects
.
a True
b False
.
42. Explain the difference between a Windows-based application and a Web-based application.
.
43. Explain the difference between a Windows Form object's Text property and its Name property.
.
44. Explain the difference between a form file object and a Windows Form object.
.
45. Define the terms "reference" and "namespace".
.

Back to Top

46. What does the dot member selection operator indicate in the text System.Windows.Forms.Label?
.
47. The _____________ property determines the order in which a control receives the focus when the user presses the Tab key or an access key.
.
a OrderTab
b SetOrder
c TabIndex
d TabOrder
e TabStop
.
48. When placing ocntrols on a form, you should maintain a consistent margin of ___________ dots from the edge of the window.
.
a one or two
b two or three
c two to five
d three to ten
e ten to twenty
.
49. If the buttons are positioned on the bottom of the screen, then each button should be _________
.
a the same height
b the same width
c the same height and the same width
.
50. If the buttons are stacked in either the upper-right or the lower-right corner of the screen, then each button should be _________
.
a the same height
b the same width
c the same height and the same width


 

 

All content on this site is free for private use only  |  Contributions are encouraged  |  Thank you to Netfirms for the free hosting  |  If copyright content is published here or links to certain content violates some right/law, contact the Webmaster to have it removed immediately.

 

Site launched: October 2005  |  Updated: July 20, 2006  |  Link exchange  |  Site map  |  Contact us