View Single Post
  #4 (permalink)  
Old June 1st, 2013, 01:20 PM
John S John S is offline
Authorized User
Points: 179, Level: 3
Points: 179, Level: 3 Points: 179, Level: 3 Points: 179, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm still trying to understand this.

Maybe I'm not asking my question correctly?

In the Solution, we have two Forms: Form1.cs and ColorForm.cs

In the code, we can call Form1 directly, as in:

private void Form1_Load (object sender, EventArgs e);

But when we want to do a "Button_Click" event that refers to ColorForm, we can't refer to it directly, as for example:

{
ColorForm.Show();

}

We have to first give it an "alias", and then reference the alias?

That is, we have to make an instance of ColorForm called remoteColorForm, and then reference that?

If we have both Form1 and ColorForm in the Solution Explorer, why can we call one by it's "true" name, but have to make up an alias to call the other one?

Alternately, why don't we have to alias Form1 before we call it?

Something like:

Form1 mainForm = new Form1();

private void mainForm_Load (object sender, EventArgs e);

???