Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何richtextbox在表单(C#)中创建一个静态,以便在其他类中调用它并定义一个可以更改它的静态方法?
richtextbox
3个步骤:
Modifiers
Public
制作表单的静态实例:
public Form1() { InitializeComponent(); _form1inc = this; } public static Form1 _form1inc;
在其他类中使用
Form1._form1inc.richTextBox1