A
Anonymous
Hi,
I have the following code. ( Sorry if it is a little rough or improperly
written ).
<########## CODE BEGIN ##########>
public class TestClass : System.Windows.Forms.UserControl
{
public TestClass( ref Color InputColor )
{
Button btn1 = new Button();
btn1.Text = "Button";
btn1.Click += new System.EventHandler( btn1_Click );
this.Controls.Add( btn1 );
}
private void btn1_Click( object sender, EventArgs e )
{
}
}
<########## CODE END ##########>
I wish to change 'InputColor' in the button click event handler, but if I
try to change 'InputColor' with the above code it fails to compile with an
error similar to "InputColor does not exist in the class or namespace blah
blah". Sure, I can understand that, however, can you please advise me of the
best way to achieve what I have described.
Thank you for any help.
I have the following code. ( Sorry if it is a little rough or improperly
written ).
<########## CODE BEGIN ##########>
public class TestClass : System.Windows.Forms.UserControl
{
public TestClass( ref Color InputColor )
{
Button btn1 = new Button();
btn1.Text = "Button";
btn1.Click += new System.EventHandler( btn1_Click );
this.Controls.Add( btn1 );
}
private void btn1_Click( object sender, EventArgs e )
{
}
}
<########## CODE END ##########>
I wish to change 'InputColor' in the button click event handler, but if I
try to change 'InputColor' with the above code it fails to compile with an
error similar to "InputColor does not exist in the class or namespace blah
blah". Sure, I can understand that, however, can you please advise me of the
best way to achieve what I have described.
Thank you for any help.