Deck 7: Multiple Forms, Modules, and Menus
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/35
العب
ملء الشاشة (f)
Deck 7: Multiple Forms, Modules, and Menus
1
When a ______form is displayed, no other form in the application can receive the focus until the form is closed.
A) hidden
B) modeless
C) modal
D) show
A) hidden
B) modeless
C) modal
D) show
C
2
The _______event occurs when a form is in the process of closing, but before it has closed.
A) FormClosing
B) FormClosed
C) CloseForm
D) Close
A) FormClosing
B) FormClosed
C) CloseForm
D) Close
A
3
All of the following are true of the Show method of a form except:
A) using the Show method allows other forms to receive the focus
B) the Show method allows a calling program to continue to process statements
C) the displayed form must be closed before you can access other forms
D) the Show method displays a modeless form
A) using the Show method allows other forms to receive the focus
B) the Show method allows a calling program to continue to process statements
C) the displayed form must be closed before you can access other forms
D) the Show method displays a modeless form
C
4
In order to prevent users from accessing a menu item, set the item's _____property to _______.
A) Enabled, False
B) Disabled, True
C) Active, False
D) Hidden, True
A) Enabled, False
B) Disabled, True
C) Active, False
D) Hidden, True
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
5
In order to add a menu to a form, you must place a ______on the form.
A) MenuCommand control
B) MenuItem control
C) MenuOption control
D) MenuStrip control
A) MenuCommand control
B) MenuItem control
C) MenuOption control
D) MenuStrip control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
6
When creating a form in Visual Basic, code associated with that form is stored in a file with a _extension.
A) sln
B) proj
C) frm
D) vb
A) sln
B) proj
C) frm
D) vb
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
7
A module-level variable declared Public is also known as a ______variable.
A) private
B) access
C) global
D) universal
A) private
B) access
C) global
D) universal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
8
All of the following are true about the Hide method of a form except:
A) Using the Hide method removes the form from memory.
B) The Hide method makes the form invisible.
C) Once you have called the Hide method, the form can be redisplayed with the ShowDialog method.
D) Once you have called the Hide method, the form can be redisplayed with the Show method.
A) Using the Hide method removes the form from memory.
B) The Hide method makes the form invisible.
C) Once you have called the Hide method, the form can be redisplayed with the ShowDialog method.
D) Once you have called the Hide method, the form can be redisplayed with the Show method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which of the following is not true about a form's Activated event?
A) It occurs when a form is initially displayed.
B) It occurs each time a form regains the focus.
C) It occurs each time the user clicks a form that does not have the focus.
D) It occurs before the Load event procedure is processed.
A) It occurs when a form is initially displayed.
B) It occurs each time a form regains the focus.
C) It occurs each time the user clicks a form that does not have the focus.
D) It occurs before the Load event procedure is processed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
10
A variable is accessible to statements outside the form if declared __________.
A) as private and class-level
B) as public
C) as public and class-level
D) with a Dim statement
A) as private and class-level
B) as public
C) as public and class-level
D) with a Dim statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which of the following statements disables the Copy menu item named mnuCopy?
A) mnuCopy.Disabled = True
B) mnuCopy.Enabled = False
C) mnuCopy.Active = False
D) mnuCopy.Disable
A) mnuCopy.Disabled = True
B) mnuCopy.Enabled = False
C) mnuCopy.Active = False
D) mnuCopy.Disable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
12
A form's ______event is triggered when the user switches to the form from another form or another application.
A) form load
B) activated
C) got focus
D) click
A) form load
B) activated
C) got focus
D) click
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
13
All of the following are true about standard modules except __________.
A) A module is a file that contains code such as variable declarations and procedures
B) A public variable declared in a standard module may be referenced by methods located anywhere in the application.
C) Standard modules may contain event handlers
D) Standard modules are not associated with a particular form
A) A module is a file that contains code such as variable declarations and procedures
B) A public variable declared in a standard module may be referenced by methods located anywhere in the application.
C) Standard modules may contain event handlers
D) Standard modules are not associated with a particular form
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
14
An instance of a form is created using a ______statement with the New keyword.
A) Dim
B) Open
C) Instantiate
D) Create
A) Dim
B) Open
C) Instantiate
D) Create
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
15
How do you insert a separator bar into a menu?
A) Type a hyphen (−) as a menu item's Text property.
B) Type a space as a menu item's Text property
C) Assign True to the Separator property
D) Right-click an existing item and select Bar from the pop-up menu
A) Type a hyphen (−) as a menu item's Text property.
B) Type a space as a menu item's Text property
C) Assign True to the Separator property
D) Right-click an existing item and select Bar from the pop-up menu
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of the following statements most accurately describes the Me keyword?
A) The Me keyword refers to the current instance of the form.
B) Me is another name for the Form Load event procedure.
C) The Me.Close() statement calls the Close method of a form named Me.
D) The Me keyword provides access to the controls of a form without naming the specific control.
A) The Me keyword refers to the current instance of the form.
B) Me is another name for the Form Load event procedure.
C) The Me.Close() statement calls the Close method of a form named Me.
D) The Me keyword provides access to the controls of a form without naming the specific control.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of the following is not true about a form's class declaration?
A) It contains a detailed description of a form.
B) It's similar to a blueprint for a house.
C) It creates an instance of the form.
D) It contains the form's event handlers.
A) It contains a detailed description of a form.
B) It's similar to a blueprint for a house.
C) It creates an instance of the form.
D) It contains the form's event handlers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
18
Standard modules are saved on disk as files that end with this extension.
A) .mod
B) .proj
C) .frm
D) .vb
A) .mod
B) .proj
C) .frm
D) .vb
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
19
What is the best way to share functions across more than one project?
A) Create the functions in one project, then copy and paste them into other projects that need them.
B) Place the code for the functions in a module and add that module to each project.
C) Place the code for the functions in the startup form of each project.
D) Place the code inside a main procedure with a public access specifier for each function.
A) Create the functions in one project, then copy and paste them into other projects that need them.
B) Place the code for the functions in a module and add that module to each project.
C) Place the code for the functions in the startup form of each project.
D) Place the code inside a main procedure with a public access specifier for each function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
20
When a VB application executes, its ______is automatically displayed.
A) main sub
B) startup form
C) event procedure
D) form load event
A) main sub
B) startup form
C) event procedure
D) form load event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
21
The best approach to move a menu item with an existing Click event to a new location is:
A) cut the menu item from the old location and paste it into the new location.
B) click the menu item and drag it to the new location
C) delete the menu item from the old location and add it to the new location
D) none of the above
A) cut the menu item from the old location and paste it into the new location.
B) click the menu item and drag it to the new location
C) delete the menu item from the old location and add it to the new location
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
22
A context menu __________.
A) is an alternative for buttons
B) is shown when the user right-clicks a form or control
C) uses the MainMenu control
D) both a and c are correct
A) is an alternative for buttons
B) is shown when the user right-clicks a form or control
C) uses the MainMenu control
D) both a and c are correct
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
23
Any form in a Windows Forms application can be designated as the startup form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
24
Explain the nature of the reference to errorForm in the following code: Dim errorForm As New frmError()
A) class name
B) form name
C) class program
D) object variable
A) class name
B) form name
C) class program
D) object variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
25
Once you create a form, you do not have to re-create it to use it in another project.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
26
The last form created for a Windows Forms application is designated as the startup form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
27
An event handler for a menu item is created by __________.
A) manually declaring the event handler
B) right-clicking the menu item
C) starting the menu designer, and then double-clicking the menu item
D) clicking the menu item
A) manually declaring the event handler
B) right-clicking the menu item
C) starting the menu designer, and then double-clicking the menu item
D) clicking the menu item
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
28
A menu item may be executed by a user in each of the following ways except __________.
A) by pressing access keys such as Alt + F
B) by pressing shortcut keys such as Ctrl + S
C) by clicking on the item
D) by hovering the mouse over the item
A) by pressing access keys such as Alt + F
B) by pressing shortcut keys such as Ctrl + S
C) by clicking on the item
D) by hovering the mouse over the item
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
29
Choose the statement below that performs the comment found on line 2 of the following code segment. Dim newStudentForm As New frmNewStudent()
'Initialize AcademicYear text box on NewStudent form to 1
NewStudentForm.ShowDialog()
A) frmNewStudent.txtAcademicYear.Text = "1"
B) txtAcademicYear.Text.newStudentForm = "1"
C) newStudentForm.txtAcademicYear.Text = "1"
D) txtAcademicYear.frmNewStudent = "1"
'Initialize AcademicYear text box on NewStudent form to 1
NewStudentForm.ShowDialog()
A) frmNewStudent.txtAcademicYear.Text = "1"
B) txtAcademicYear.Text.newStudentForm = "1"
C) newStudentForm.txtAcademicYear.Text = "1"
D) txtAcademicYear.frmNewStudent = "1"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
30
What is the result of the following section of code? Private Sub btnExit_Click(ByVal sender As System.Object, _
ByVal e as System.EventArgs) Handles btnExit.Click
Me)Close()
End Sub
A) Shut down the computer
B) Log off the current user
C) Close the current form
D) None of the above
ByVal e as System.EventArgs) Handles btnExit.Click
Me)Close()
End Sub
A) Shut down the computer
B) Log off the current user
C) Close the current form
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
31
When a menu control's _____property equals True, a check appears next to the menu item.
A) showCheck
B) Checked
C) Check
D) none of the above
A) showCheck
B) Checked
C) Check
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
32
What property must be set on a menu item to have the user activate that option by pressing Ctrl + C on the keyboard?
A) ShortcutKeys
B) QuickKey
C) HotKey
D) ShowShortCut
A) ShortcutKeys
B) QuickKey
C) HotKey
D) ShowShortCut
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
33
The best way to maintain consistency when renaming a form is to __________.
A) change the form's Name property
B) change the form's filename in the Solution Explorer window
C) click Project on the menu bar, and then select Change Windows Form
D) change the form's name in the form's class declaration
A) change the form's Name property
B) change the form's filename in the Solution Explorer window
C) click Project on the menu bar, and then select Change Windows Form
D) change the form's name in the form's class declaration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
34
The primary reason to use standard menu items, such as File, Edit, and Help is ______.
A) these are built into Visual Basic
B) they are the only items that Visual Basic allows you add to a menu
C) all the examples in the book are set up this way
D) most users expect to see these items
A) these are built into Visual Basic
B) they are the only items that Visual Basic allows you add to a menu
C) all the examples in the book are set up this way
D) most users expect to see these items
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
35
Which of the following statements will display the getStudentDataForm form in such a way that any code following the statement will not execute until the getStudentDataForm closes?
A) getStudentDataForm.Open()
B) getStudentDataForm.Show()
C) getStudentDataForm.ShowDialog()
D) getStudentDataForm.OpenForm.Modal()
A) getStudentDataForm.Open()
B) getStudentDataForm.Show()
C) getStudentDataForm.ShowDialog()
D) getStudentDataForm.OpenForm.Modal()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck