Merhaba
C# da kendim bir tane buton property oluşturdum.
Butonun bulunduğu, formdaki değişkenlere göre buton classı içinde işlemler yapmak istiyorum.
Fakat buton classı içinde form değişkenine nasıl ulaşabileceğimi bulamadım yardımcı olabilir misiniz?
`public class OPCButton : Button
{
protected override void OnMouseDown(MouseEventArgs mevent)
{
base.OnMouseDown(mevent);
Control.BtnToggle(Form1.Test); //Butonun içinde olduğu formu kod ile bulmak istiyorum
this.Invalidate();
}
}`