Visual Programming | 0413203 | 2st Semester 2022/2023
Instructor: Dr. Hani Al-Bloush
VP LAB Worksheet 7: Students Information Form
Instructions for the 7th lab in C# Visual Programming:
1. The following parts are designed for you to make a good start in using Files (read, write and
append), dialogs (save, open, color and font dialog), functions and arrays in a two-hour session.
2. You need to upload your solution in a single compressed folder on E-learning by the end of
lab7.
3. Two out of ten marks will be deducted in case of late submission after completion of lab6 and
postponement of delivery to or before 2 May, 11:59 pm.
Part 1: Project Form
In visual studio, do the following:
1- Create a new project named StudentsApplication.
2- Design a new form (Student Form) as shown in the figure below.
1
Part 2: Files read, write, append
1. Create a file using CreateText object and write into the file the student grades as
follows:
Mid: 25
Project: 20
Final: 44
2. Fill all the information in the form and upload grades from the file created already.
Then, show the grades in the list box.
Hint: use OpenText
3. Save all information into a new file (studentInfo).
Part 3: Dialog Buttons
Implement the buttons:
• Change color: color dialog.
Hint: from ToolBox find ColorDialog and deal with just like OpenFile and SaveFile Dialog
• Change font: FontDialog same as ColorDialog.
• Save: writes all the student information into a file (studentInfo).
• Reset: Refill fields with stored data.
Hint: Read all the data from the studentInfo file and store it in a string array and then place the
data in the corresponding area.
• Clear: clears all fields on the form.
• Close: Closes the form.