0% found this document useful (0 votes)
2 views

Week_5

This lecture covers the fundamentals of Windows applications, focusing on Windows Forms as a framework for developing GUI-based software. Students will learn about properties that influence UI elements and identify common controls used in application design. Key takeaways include the event-driven nature of applications and the ease of UI design with Windows Forms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Week_5

This lecture covers the fundamentals of Windows applications, focusing on Windows Forms as a framework for developing GUI-based software. Students will learn about properties that influence UI elements and identify common controls used in application design. Key takeaways include the event-driven nature of applications and the ease of UI design with Windows Forms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Learning Objectives:

By the end of this lecture, students will be able to:

1. Understand the basics of Windows applications.

2. Describe Windows Forms and their role in application development.

3. Explain properties and how they influence UI elements.

4. Identify and use common controls in Windows Forms.

1. Overview of Windows Applications

Windows applications are software programs designed to run on the Windows operating system.
They feature graphical user interfaces (GUIs) and can be developed using frameworks like Windows
Forms (WinForms), Windows Presentation Foundation (WPF), and Universal Windows Platform
(UWP).

Key Characteristics:

• Graphical Interface: Windows applications rely on buttons, text fields, and menus.
• Event-Driven: User actions (like clicking a button) trigger events handled by the application.
• Stateful: Applications maintain data while running, allowing for interactive experiences.

Real-Life Examples:

• Microsoft Word
• Paint
• Calculator

Discussion Question (5 min):

Can you name a few Windows applications you use daily? What features make them user-friendly?

2. Introduction to Windows Forms (WinForms)

Windows Forms is a framework in .NET for building Windows-based applications with a GUI. It
provides a set of prebuilt components that help developers create user-friendly applications quickly.

Key Features of Windows Forms:

✔ Drag-and-drop controls for UI design.

✔ Support for event-driven programming.

✔ Integration with databases (e.g., SQL Server).

✔ Customizable UI elements.
Activity (10 min):

Open Visual Studio, create a Windows Forms Application, and explore the default form.

3. Properties in Windows Forms

Every control in Windows Forms has properties that define its appearance and behavior.

Common Properties:

Property Description Example


BackColor Sets the displayed text. `"Submit"` for a button.
Font Changes background color. `Blue` for a label.
Size Defines text style. ‘Bold, 12pt Arial` for a textbox.
Adjusts width and height. `200x50 pixels` for a button.

Hands-On Task (10 min):

Modify properties of a Button in Visual Studio (change text, color, size).

4. Common Controls in Windows Forms

Windows Forms provides various built-in controls to design user interfaces efficiently.

Most Common Controls:

1. Button – Executes an action when clicked.

2. Label – Displays text information.

3. TextBox – Allows user input.

4. CheckBox – Enables selection of multiple options.

5. RadioButton – Selects one option from a group.

6. ComboBox – Provides a dropdown list of choices.

7. ListBox – Displays a list of items.

8. PictureBox – Shows images.

Example: Simple Login Form

Username (Label + TextBox) Password (Label + TextBox) Login (Button)

Remember Me (CheckBox)
Key Takeaways:

✔ Windows applications are GUI-based and event-driven.

✔ Windows Forms is a .NET framework for building desktop applications.

✔ Properties define the appearance and behavior of controls.

✔ Common controls like buttons, labels, and textboxes make UI design easy.

You might also like