wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

1. Introduction & 2. Architecture

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which statement best describes the event-driven model in Windows Forms?

a)

Code runs strictly top to bottom without waiting

b)

The UI polls continuously for hardware interrupts

c)

All controls execute their methods simultaneously

d)

The application waits for user actions and responds

2.

In a Windows Forms application, what is the primary role of a Form compared to a Control?

a)

Form is a single pre-built button component

b)

Form acts as the main container for controls

c)

Form renders text-based input only

d)

Form is an event handler for click actions

3.

Which action ensures your Windows Forms project targets the correct platform for this course?

a)

Install Xamarin workload before creating the project

b)

Skip framework selection and accept default settings

c)

Select .NET Core template in the new project list

d)

Choose .NET Framework 4.7.2 or later during setup

4.

Which property determines where a Windows Form first appears when the application starts?

a)

Size property sets initial location and dimensions

b)

FormBorderStyle property positions the window at launch

c)

StartPosition property controls initial location

d)

BackColor property defines initial location on screen

5.

Which control category primarily allows users to enter or select data in a Windows Forms application?

a)

Output controls for information display

b)

Input controls for data entry

c)

Action controls for user triggers

d)

Container controls for organization

6.

You are naming a TextBox that collects a first name. Which C# prefix follows standard Windows Forms conventions?

a)

lbl for text display

b)

txt for text input

c)

btn for click actions

d)

cbo for dropdowns

7.

Which TextBox property prevents users from modifying its content while still displaying it?

a)

MaxLength property set to zero

b)

ReadOnly property set to true

c)

PasswordChar property set to '*'

d)

Multiline property set to false

8.

A form needs a single choice among several courses while still showing the list. Which control best fits this requirement?

a)

TextBox for manual typing

b)

ComboBox with dropdown list

c)

CheckBox for multiple options

d)

DateTimePicker for scheduling

9.

You must allow users to choose exactly one option from a group and ensure selections in separate groups don’t affect each other. What should you use and how should it be arranged?

a)

RadioButtons placed inside a GroupBox

b)

CheckBoxes placed inside one Panel

c)

ComboBox with DropDownStyle Simple

d)

TextBox with MaxLength and Multiline

10.

In a Windows Forms app, which Label property is responsible for automatically resizing the label to fit its content?

a)

ForeColor sets the displayed text color

b)

BorderStyle changes visual frame style

c)

AutoSize expands or shrinks to fit text

d)

TextAlign adjusts alignment within bounds

11.

You need a confirmation dialog with Yes and No choices plus a Cancel option and a question icon. Which MessageBox.Show configuration best meets this requirement?

a)

MessageBoxButtons.OK with Warning icon

b)

MessageBoxButtons.OKCancel with Information icon

c)

MessageBoxButtons.YesNoCancel with Question icon

d)

MessageBoxButtons.YesNo with Error icon

12.

Which control event is appropriate for validating a TextBox as the user types?

a)

MouseEnter on any control

b)

TextChanged on the TextBox control

c)

Click on the TextBox control

d)

Load on the parent Form control

13.

You need to initialize ComboBox items and set default selections before any user interaction. Which event should you handle?

a)

CheckedChanged to set defaults

b)

KeyPress to populate controls

c)

Load to initialize controls

d)

FormClosing to prepare controls

14.

In the Save button handler, which sequence correctly computes age from a DateTime birthDate while ensuring upcoming birthdays are handled?

a)

age = DateTime.Today.Year - birthDate.Year; if (birthDate > DateTime.Today.AddYears(-age)) age--;

b)

age = (DateTime.Today - birthDate).Days / 365; if (birthDate.Month == DateTime.Today.Month) age--;

c)

age = DateTime.Now.Year - birthDate.Year; if (birthDate < DateTime.Today.AddYears(age)) age--;

d)

age = DateTime.Today.Year - birthDate.Year; if (birthDate >= DateTime.Today) age--;

15.

Which practice best supports a clean, professional Windows Forms UI when arranging controls?

a)

Rely on default positions without adjustments

b)

Place all controls inside a single large GroupBox

c)

Align controls consistently using layout containers

d)

Use random TabIndex values across controls