相关疑难解决方法(0)

C#以编程方式更改对象的位置

我尝试了以下代码:

 this.balancePanel.Location.X = this.optionsPanel.Location.X;
Run Code Online (Sandbox Code Playgroud)

在程序运行时更改我在设计模式下创建的面板的位置但它返回错误:

Cannot modify the return value of 'System.Windows.Forms.Control.Location' because it is not a variable
Run Code Online (Sandbox Code Playgroud)

所以问题是我该怎么做?

c# controls runtime visual-studio-2010 winforms

38
推荐指数
4
解决办法
12万
查看次数

标签 统计

c# ×1

controls ×1

runtime ×1

visual-studio-2010 ×1

winforms ×1