Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ABBOTTABAD UNIVERSITY OF SCIENCE AND

TECHNOLOGY

Visual programming

Assignment: 03

SUBMITTED BY: S h u j a h H a i d e r

Roll No: 8794

SUBMITTED TO: S i r w a j i d

Semester: BSCS 6th

DEPARTMENT: Computer Science


Question No 01:

What is windows form applications. Explain with example.

Answer:

Windows Forms applications are a way to create desktop applications for Windows operating systems. They provide a
graphical user interface (GUI) that allows users to interact with the application.

For example, imagine you want to create a simple calculator application. You can use Windows Forms to design the buttons,
text boxes, and other elements of the calculator's interface. Users can then click on the buttons to perform calculations and
see the results on the screen.

Windows Forms applications are a great way to create user-friendly and visually appealing desktop applications.

Question No 02:

Write down 10 different controls of windows form application along their properties and at least 4 events of each.

Answer:

10 different controls commonly used in Windows Forms applications along with some of their properties and a few events
for each. Here you go:

1. Button Control:
- Properties: Text, Enabled, Visible
- Events: Click, MouseEnter, MouseLeave, DoubleClick

2. TextBox Control:
- Properties: Text, Enabled, Multiline
- Events: TextChanged, KeyPress, MouseEnter, MouseLeave

3. Label Control:
- Properties: Text, Font, ForeColor
- Events: Click, MouseEnter, MouseLeave, DoubleClick

4. ComboBox Control:
- Properties: Items, SelectedIndex, DropDownStyle
- Events: SelectedIndexChanged, DropDown, DropDownClosed, KeyPress

5. ListBox Control:
- Properties: Items, SelectedItems, SelectionMode
- Events: SelectedIndexChanged, MouseEnter, MouseLeave, DoubleClick

6. RadioButton Control:
- Properties: Text, Checked, AutoCheck
- Events: CheckedChanged, MouseEnter, MouseLeave, DoubleClick

7. CheckBox Control:
- Properties: Text, Checked, ThreeState
- Events: CheckedChanged, MouseEnter, MouseLeave, DoubleClick

8. PictureBox Control:
- Properties: Image, SizeMode, Enabled
- Events: Click, MouseEnter, MouseLeave, DoubleClick

9. DateTimePicker Control:
- Properties: Value, Format, ShowUpDown
- Events: ValueChanged, DropDown, CloseUp, KeyPress

10. MenuStrip Control:


- Properties: Items, Enabled, Visible
- Events: ItemClicked, MouseEnter, MouseLeave, DoubleClick
These are just a few examples of the controls available in Windows Forms applications. Each control has many more
properties and events that can be customized to fit your application's needs.
Q3: Write a simple windows program to display the follow
form

Below is a simple example of a Windows Forms Application in C# that


displays a form with fields for Name, Qualification, Age, and includes an
Image and Signature:

You might also like