Use a text editor (not Visual Studio) to create a c# source file that meets the following requirements. Compile and run the file from the Visual Studio command prompt.
Add a class to the c# file that extends the Form
class.
System
namespace.Panel
to your form.
System.Drawing.Color
value (like Red, Green, Blue, etc.).DockStyle
enumeration to set the value. Use the Height
and Width
properties to control the original size of the form before it is docked.
Label
to the panel. Set the value of the label to your name.Label
to the form. Set the value of the label to Name: . Do not display the label at point (0,0) in the form. Use the Top
and Left
properties to position the label.TextBox
to the form. Align the text box next to the label. Anchor the text box to the top, left and right. Use the AnchorStyles
enumeration to set the values, use the |
operator to or more than one value together.Button
to the form.
Add a class to the c# file that has a main method. The Main
method in a c# program can be overloaded with a String[] args
parameter. This argument contains the command line arguments.
Application
class to run the application with your form as the main form.
To compile and run the program, open the command line window that can be accessed from the Visual Studio Tools folder.
Compile the c# file with the cs
compiler.
Run the command with several different command line arguments. Also run it with no command line arguments.
Upload your c# file to me using the upload program on my class page:
Submitting
Homework Online.