C# Windows Form Instructions: Topics: Open and Save file dialogs, Controls, Designer, Group box, Menu, User input, Events, and Event handlers Students will create a
C# Windows Form
Instructions:
Topics: Open and Save file dialogs, Controls, Designer, Group box, Menu, User input, Events, and Event handlers
Students will create a simple Windows Forms application with a variety of user input controls that can save and load the values in the controls using external files through options in a menu bar.
For this exercise you will implement 3 unique types of user input controls of your choice and a button that can reset all of the user input controls to their default values. All 4 of these controls should be grouped together in a group box container.
You will also add a menu bar with a File option. Under the File option there will be 3 choices: Load, Save, and Exit. Exit should close the application. Save should save the current contents of the user input fields to a file and Load should allow the user to load one of those files. The format to save and load is up to you, but it should not use a third party library.
Use the following guidelines to complete this application:
User Input
-
At least 3 unique types of input controls of your choice (TextBox, NumericUpDown, CheckBox, ComboBox, etc.)
-
A button that resets all user input controls to their default values
MenuStrip
-
Has a top level File option that contains 3 choices: Load, Save, and Exit
Load Data
-
Use an OpenFileDialog class to have the user select what file to load.
-
Use a StreamReader or any of the other file i/o classes to read in the file and populate the controls with that information.
-
Check the documentation of the OpenFileDialog class on the MSDN for examples of how to use it.
Save Data
-
Use a SaveFileDialog class to allow the user to select a file to write to.
-
Use a StreamWriter or any of the other file i/o writing classes to write the contents of the controls to that file in whatever format you choose.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started