Hello,
i have a little dificulties in the area of object-oriented programming i guess...
i am making a chess-like game
i created the classes "board" and "square" (the square inherit from picturebox)
now - in the constructor of the board i create 8X8 squares inside it
all the program is ran from the form1.cs
inside the board when i create new 8X8 squares i add them -
this.square[i, j].Click += new System.EventHandler(this.Square_Click);
and in the same place under that i place the -
private void Square_Click(object sender, EventArgs e)
{
the problem is, i want that things inside form1.cs will change when i for example click on one of the squares but the thing is that the things inside the Square_CLick doesnt "know" the things that inside form1.cs
for example - i create button1 in form1.cs.
from the form1.cs i can for example change its Text Button1.Text etc.
but from the Square_Click i cant do that when i click on the button1...
how can i do that?
thanks in advance - and sorry if its complicated to understand - rough english + new in C#