how to access winform components from another class?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i have a form with one button and two labels and i have a separate class called myCounter i want the myCounter class to be able to access the labels in the form through a method called changeColor.. how can make the labels available in this class the form public partial class Form1 : Form { public Form1() { InitializeComponent(); } public Color colTurn { get { return lblp1Turn.BackColor; } set { lblp1Turn.BackColor = value; } } private void Form1_Load(object sender, EventArgs e) { } } the class class myCounter { private readonly Form1 Board;