In: Computer Science
Which of the following methods displays the second form on top of the main form?
Group of answer choices
PresentForm()
ShowDialog()
DisplayForm()
ShowForm()
-
Which of the following statements closes the form:
Group of answer choices
Close().Me
Close().Form
Me.Close()
Form.Close()
-To create an instance of a form, using the following statement. what the ? (question mark) must be?
Dim frmForm1 As ? Form1
Group of answer choices
DESIGN
NEW
GENERATE
CREATE
Where do you type the code for menu?
Group of answer choices
in corresponding menu item
in corresponding menu task
in corresponding toolbar
in menu file
-
The following statement creates an _______ of the QuizzesForm form:
Dim frmQuizzes as New QuizzesForm
Group of answer choices
value
reference
instance
sample
Answer 1 :
Showform displays the secnond form on the top of the first form that is main form
private void Shownform(object sender, EventArgs e)
{
Form2 form2 = new Form2();
form2.Show();
}
form 2 == show form
form 1 == main form
Answer 2 :-- Form.close()
When calling this.Close(), current form is disposed together with form2. Therefore you need to hide it and set form2.Closed event to call this.Close().
private void OnButton1Click(object sender, EventArgs e)
{
this.Hide();
var form2 = new Form2();
form2.Closed += (s, args) => this.Close();
form2.Show();
}
Answer 3 :-- NEW
Public Class frmMain Dim frmForm1 As New Form1 Dim frmDelgates As New frmDelegate Dim frmEvent As New frmSimpleEvents
Answer 4:-- In correspinding menu item
you have the main menu sorted, so we take it a step further and add a submenu to the Open menu item.
Click the Open menu item.
Answer 5 :-- Reference
here we are taking the reference of the Dim frmQuizzes as New QuizzesForm