Write the statement that will display a form named, SummaryForm, as modal Soluti
ID: 3657786 • Letter: W
Question
Write the statement that will display a form named, SummaryForm, as modalExplanation / Answer
c#................................................................ private void ShowMyNonModalForm() { Form myForm = new Form(); myForm.Text = "My Form"; myForm.SetBounds(10,10,200,200); myForm.Show(); // Determine if the form is modal. if(myForm.Modal == false) { // Change borderstyle and make it not a top level window. myForm.FormBorderStyle = FormBorderStyle.FixedToolWindow; myForm.TopLevel = false; } } c++.................................................................................... private: void ShowMyNonModalForm() { Form^ myForm = gcnew Form; myForm->Text = "My Form"; myForm->SetBounds( 10, 10, 200, 200 ); myForm->Show(); // Determine if the form is modal. if ( myForm->Modal == false ) { // Change borderstyle and make it not a top level window. myForm->FormBorderStyle = ::FormBorderStyle::FixedToolWindow; myForm->TopLevel = false; } } Visual Basic................. Private Sub ShowMyNonModalForm() Dim myForm As New Form() myForm.Text = "My Form" myForm.SetBounds(10, 10, 200, 200) myForm.Show() ' Determine if the form is modal. If myForm.Modal = False Then ' Change borderstyle and make it not a top level window. myForm.FormBorderStyle = FormBorderStyle.FixedToolWindow myForm.TopLevel = False End If End Sub
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.