M
Mike
Hi All,
I'm new to C# and would appreciate any help.
I am trying to put an X on specified controls (buttons, group boxes,
textboxes) on a form. How do I ID the myControl in putX?
Thanks.
private void button1_Click(object sender, System.EventArgs e)
{
string tstr;
putX(aControl);
}
private void putX(type myControl)
{
System.Drawing.Size mySize = myControl.Size;
System.Drawing.Graphics myGraphics = myControl.CreateGraphics();
System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(System.Drawing.Color.Black);
myGraphics.DrawLine(myPen,0,0,mySize.Width, mySize.Height);
myGraphics.DrawLine(myPen,0,mySize.Height,mySize.Width,0);
}
I'm new to C# and would appreciate any help.
I am trying to put an X on specified controls (buttons, group boxes,
textboxes) on a form. How do I ID the myControl in putX?
Thanks.
private void button1_Click(object sender, System.EventArgs e)
{
string tstr;
putX(aControl);
}
private void putX(type myControl)
{
System.Drawing.Size mySize = myControl.Size;
System.Drawing.Graphics myGraphics = myControl.CreateGraphics();
System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(System.Drawing.Color.Black);
myGraphics.DrawLine(myPen,0,0,mySize.Width, mySize.Height);
myGraphics.DrawLine(myPen,0,mySize.Height,mySize.Width,0);
}