C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
Windows Forms - Lesson 4: Menus & Dialogs Quiz
Answer all questions to test your understanding
1
Which control is used to create a menu bar in Windows Forms?
ToolStrip
MenuStrip
ContextMenuStrip
StatusStrip
2
What method displays a MessageBox with an OK button?
MessageBox.Display()
MessageBox.Show()
MessageBox.Open()
MessageBox.Popup()
3
What does OpenFileDialog.ShowDialog() return?
DialogResult.OK or DialogResult.Cancel
The file path
The file contents
A boolean value
4
How do you access the selected file from OpenFileDialog?
openDialog.SelectedFile
openDialog.FileName
openDialog.FilePath
openDialog.Path
5
What does setting DialogResult = OK do in a custom form?
Closes the form and returns OK to the caller
Minimizes the form
Maximizes the form
Hides the form
Submit Quiz