Adv VB.Net Quiz 7

43 Questions | Total Attempts: 72

SettingsSettingsSettings
Please wait...
Programming Quizzes & Trivia

Questions and Answers
  • 1. 
    Use the _______ control from the toolbox to create list boxes on a form.
    • A. 

      List

    • B. 

      ListBox

    • C. 

      ComboBox

    • D. 

      SimpleList

  • 2. 
    A _______ control contains a text box as part of the control
    • A. 

      Frame

    • B. 

      ListBox

    • C. 

      ComboBox

    • D. 

      DropDownList

  • 3. 
    Which of the following is not a style for combo boxes?
    • A. 

      Simple

    • B. 

      DropDown

    • C. 

      DropDownList

    • D. 

      SimpleList

  • 4. 
    List boxes and combo boxes _______.
    • A. 

      Are created with the same tool from the toolbox

    • B. 

      Have a Text property during design time

    • C. 

      Hold a list of values

    • D. 

      Always have scroll bars

  • 5. 
    Items can be added to a list during design time using the _________ collection.
    • A. 

      AddLists

    • B. 

      Items

    • C. 

      ItemsAdd

    • D. 

      AddItems

  • 6. 
    Values for the items in a list _______.
    • A. 

      Can be entered in the Items collection in the Properties window

    • B. 

      Can be entered in the Values collection in the Properties window

    • C. 

      Can be entered in the AddItem collection in the Properties window

    • D. 

      Must be entered in alphabetical order

  • 7. 
    The data that appears in a combo box when it is first displayed can be added to the combo box _______.
    • A. 

      Using the Form_Load procedure and the combo box Items.Add method

    • B. 

      During design time in the Items Collection of the combo box

    • C. 

      Using the ComboBox.Add() method

    • D. 

      Answers A and B are correct

  • 8. 
    Items can be added to a list during run time using the _________ method.
    • A. 

      AddLists

    • B. 

      Lists

    • C. 

      ItemsAdd

    • D. 

      Items.Add

  • 9. 
    Items in a list can be placed in alphabetical order by _______.
    • A. 

      Setting the Sorted property to True

    • B. 

      Selecting the item in the list and then using the arrow keys to move the item up or down the list

    • C. 

      Setting the Alphabetize property to True

    • D. 

      Setting the Index property to 1

  • 10. 
    Which of the following instructions will add the word, monkey, to a list box named lstAnimals?
    • A. 

      LstAnimals.Insert(monkey)

    • B. 

      LstAnimals.Insert (“monkey”)

    • C. 

      LstAnimals.Items.Add(monkey)

    • D. 

      LstAnimals.Items.Add(“monkey”)

  • 11. 
    The code that will add the name, John, to a combo box named cboNames is _______.
    • A. 

      CboNames.Items.Add (“John”)

    • B. 

      CboNames.AddItem = (“John”)

    • C. 

      Add.cboNames = (“John”)

    • D. 

      Add.”John”.cboNames

  • 12. 
    The SelectedIndex property of the first item in a list is _______.
    • A. 

      - 1

    • B. 

      0

    • C. 

      1

    • D. 

      True

  • 13. 
    What is the value of the SelectedIndex property if the user has not selected an item from a combo box?
    • A. 

      -1

    • B. 

      0

    • C. 

      1

    • D. 

      None of the above

  • 14. 
    What is the value of the SelectedIndex property if the user has selected the last item in a list with four items?
    • A. 

      3

    • B. 

      4

    • C. 

      5

    • D. 

      0

  • 15. 
    Which of the following code examples can be used to determine the number of items in a list box named lstColor?
    • A. 

      LstColor.Count.Index

    • B. 

      LstColor.Items.Count

    • C. 

      LstColor(Items.Total)

    • D. 

      LstColor.SelectedIndex

  • 16. 
    An individual item can be deleted from a list with the _______.
    • A. 

      Items.Delete method

    • B. 

      Items.Clear method

    • C. 

      Items.Erase method

    • D. 

      Items.RemoveAt method

  • 17. 
    The code to delete the selected item from lstColor is _______.
    • A. 

      LstColor.Clear

    • B. 

      LstColor.RemoveItem

    • C. 

      LstColor.Delete (lstColor.ListIndex)

    • D. 

      LstColor.Items.RemoveAt (lstColor.SelectedIndex)

  • 18. 
    Which text box event occurs when a text box gets the focus?
    • A. 

      Click event

    • B. 

      Enter event

    • C. 

      Leave event

    • D. 

      TextChanged event

  • 19. 
    Which text box event occurs each time the user types a character into a text box?
    • A. 

      Click event

    • B. 

      GotFocus event

    • C. 

      Enter event

    • D. 

      TextChanged event

  • 20. 
    The process of repeating a series of instructions is called ______________.
    • A. 

      Repetition

    • B. 

      Reiteration

    • C. 

      Looping

    • D. 

      Initializing

  • 21. 
    The group of instructions that are repeated in a Do/Loop are called a(n) __________.
    • A. 

      Group

    • B. 

      Set

    • C. 

      Loop

    • D. 

      Iteration

  • 22. 
    A single execution of a group of instructions inside a Do/Loop is called _______.
    • A. 

      An iteration

    • B. 

      A loop

    • C. 

      A set

    • D. 

      A group

  • 23. 
    The statements inside of a Do/Loop may never be executed if _______.
    • A. 

      The terminating condition is at the top of the loop and it is True the first time it is tested

    • B. 

      The terminating condition is at the bottom of the loop and it is True the first time it is tested

    • C. 

      Both answers A and B would cause the statements in the loop not to be executed

    • D. 

      The statements in the loop will always be executed

  • 24. 
    The values of Boolean data types are referred to as _______.
    • A. 

      Banners

    • B. 

      Flags

    • C. 

      Ribbons

    • D. 

      Posters

  • 25. 
    When is the counter incremented in a FOR/NEXT statement?
    • A. 

      In the NEXT statement

    • B. 

      In the FOR statement

    • C. 

      In the Exit For statement

    • D. 

      When the statements in the loop are executed