Getting familiar with TSClient, VS.NET, and
Basic C# Programming
Due: Monday, Sept 17, 5:00 PM
- Follow the instructions on installing the TSClient software on your
machine (or use a public machine with the software already installed).
- Run VS.NET. Follow the example in Chapter 2 of the textbook, taking
liberty in choice of the background color of the window, exactly how and
where you position the label, the text that you use for the label, and so
on. One thing that you should make constant, however, is the image
that you choose: use the image "Desktop\My Documents\My
Pictures\Sample".
- Execute your program by selecting "Debug | Start". Proper
execution will result in a new
window opening up that looks much like the "Design" view in VS.NET. To terminate the
program execution, click on
the "x" in the upper right corner of the new window.
- So far, as the textbook points out, you have not written a single line of
code! To change this, we will write a few lines of code to change
the text and color of the label component in your window:
- Select the "code view" of your program, and look for this
section of the code:
public Form1()
{
//
// Required for
Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add
any constructor code after InitializeComponent call
//
}
- Just after the last "//" and just before the "}",
insert the following new line of code:
this.label1.Text
= "Yo, Wassuup??!!";
Now run your program as before, and see what affect this has on
your program behavior.
- Finally, change the color of the label component by adding this line
of code right after the one above:
this.label1.BackColor
= System.Drawing.Color.Red;
Again, run your program and observe the effect this change has on
your program behavior.
|