Visual Basic Questions Test! Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Tcarteronw
T
Tcarteronw
Community Contributor
Quizzes Created: 38 | Total Attempts: 30,244
Questions: 10 | Attempts: 1,483

SettingsSettingsSettings
Visual Basic Questions Test! Quiz - Quiz


Are you familiar with Visual Basic? Do you believe you can beat this "Visual Basic Questions Test?" Take the quiz then! Microsoft's Visual Basic provides the latest updates to the Microsoft Visual Studio Development System. It is one of the highly popular tools for obtaining applications on Windows. It allows you to assemble the established applications as executable files. Take this test and discover how much you know about visual basic. Go for it!


Questions and Answers
  • 1. 

    The ______ symbol is used for concatenation.

    • A.

      & (ampersand)

    • B.

      @ (at)

    • C.

      ' (apostrophe)

    • D.

      _ (underscore)

    Correct Answer
    A. & (ampersand)
    Explanation
    The ampersand symbol (&) is used for concatenation in programming. Concatenation is the process of combining two or more strings together. In many programming languages, the ampersand is used to join strings or variables together to create a new string. For example, in JavaScript, the ampersand is used with the "+" operator to concatenate strings. This allows programmers to combine different pieces of text or variables to form a single string value.

    Rate this question:

  • 2. 

    If you would like to change the background color on a form, you must change the form's _____________ property.

    • A.

      ForeColor

    • B.

      BackColor

    • C.

      Appearance

    • D.

      Background

    Correct Answer
    B. BackColor
    Explanation
    To change the background color on a form, you need to modify the form's BackColor property. This property allows you to specify the desired color for the background of the form. By changing the BackColor property, you can customize the visual appearance of the form and make it more visually appealing or suitable for your application's design.

    Rate this question:

  • 3. 

    As a program runs, the insertion point can be moved from control to control.  In order to reset the focus back in a text box named name textbox, you should use the code _______.

    • A.

      TxtName.Focus()

    • B.

      TxtName = Focus()

    • C.

      TxtName = Top()

    • D.

      TxtName.First()

    Correct Answer
    A. TxtName.Focus()
    Explanation
    To reset the focus back to the text box named "name textbox", the correct code to use is "txtName.Focus()". This code will set the insertion point to the specified text box, allowing the user to continue typing or interacting with it. The other options, "txtName = Focus()", "txtName = Top()", and "txtName.First()", are not valid syntax and will not achieve the desired result.

    Rate this question:

  • 4. 

    Which of the following statements will clear the contents of a text box named message textbox?

    • A.

      TxtMessage.Text = ""

    • B.

      TxtMessage.Clear()

    • C.

      TxtMessage.Text = String.Empty

    • D.

      All of the answers are correct

    Correct Answer
    D. All of the answers are correct
    Explanation
    All of the given statements will clear the contents of a text box named message textbox. The first statement `txtMessage.Text = ""` sets the text property of the textbox to an empty string, effectively clearing the contents. The second statement `txtMessage.Clear()` is a method that clears the contents of the textbox. The third statement `txtMessage.Text = String.Empty` also sets the text property to an empty string. Therefore, all of these statements will clear the contents of the textbox.

    Rate this question:

  • 5. 

    Setting the TabIndex of a control to 0 (zero) will _______.

    • A.

      Cause the control to appear to the right of the other controls

    • B.

      Make the control Visible

    • C.

      Align the control to the left of the other controls

    • D.

      Set the focus on this control when the program begins running

    Correct Answer
    D. Set the focus on this control when the program begins running
    Explanation
    Setting the TabIndex of a control to 0 (zero) will set the focus on this control when the program begins running.

    Rate this question:

  • 6. 

    Create keyboard access on an object by ______________ in the Text property.

    • A.

      Using an ampersand (&)

    • B.

      Using at (@)

    • C.

      Using underscore ( _)

    • D.

      Capitalizing the first letter of the word

    Correct Answer
    A. Using an ampersand (&)
    Explanation
    To create keyboard access on an object, you can use an ampersand (&) in the Text property. This allows the user to access the object by pressing the Alt key along with the underlined letter in the object's text label. For example, if you set the Text property of a button to "Save & Exit", the user can press Alt+S to activate the button.

    Rate this question:

  • 7. 

    You can vertically align a group of controls on your form by first selecting all of the controls to be aligned and then _______.

    • A.

      Setting their X property to the same value

    • B.

      Selecting Align from the Format menu and then choosing Lefts.

    • C.

      Selecting "Make Same Size" from the Layout toolbar

    • D.

      Setting their Height property to the same value

    Correct Answer
    D. Setting their Height property to the same value
    Explanation
    To vertically align a group of controls on a form, you need to select all of the controls and then set their Height property to the same value. This will ensure that all the controls have the same height, resulting in a vertically aligned group.

    Rate this question:

  • 8. 

    The property used to display information in a TextBox is _______.

    • A.

      Caption

    • B.

      Name

    • C.

      Text

    • D.

      Appearance

    Correct Answer
    C. Text
    Explanation
    The property used to display information in a TextBox is "Text". This property allows the user to input or display text in the TextBox control. It is commonly used to get or set the text content of the TextBox.

    Rate this question:

  • 9. 

    Which of the following is not an object?

    • A.

      Form

    • B.

      GroupBox

    • C.

      RadioButton

    • D.

      All of the above are objects

    Correct Answer
    D. All of the above are objects
    Explanation
    All of the options listed (Form, GroupBox, and RadioButton) are objects in programming. Objects are instances of classes that have properties and methods. They can be used to represent and manipulate data in a program. Therefore, the correct answer is that all of the options are objects.

    Rate this question:

  • 10. 

    You can break a long line of code into multiple lines by ________ and then continue writing code on the next line.

    • A.

      Pressing the Enter key at the end of the line

    • B.

      Adding a blank space and a plus sign ( + ) at the end of the line

    • C.

      Adding a blank space and an ampersand ( & ) at the end of the line

    • D.

      Adding a blank space and an underscore ( _ ) at the end of the line

    Correct Answer
    D. Adding a blank space and an underscore ( _ ) at the end of the line
    Explanation
    To break a long line of code into multiple lines, you can add a blank space and an underscore ( _ ) at the end of the line. This allows you to continue writing the code on the next line without any syntax errors.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Aug 28, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 11, 2011
    Quiz Created by
    Tcarteronw
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.