Cannot modify the return value of 'System...ClientRectangle' because it is not a variable
来源:互联网 发布:上海动悦网络靠谱吗 编辑:程序博客网 时间:2024/05/16 11:06
最近做一个换肤的程序, 在修改窗体的ClientRectangle.Height值的时候出现了题目这样的错误。
后来发现,把鼠标放到ClientRectangle.Height的Height上时, 显示可以进行Get和Set
但 ClientRectangle本身的定义里面只支持Get操作, 而没有Set操作, 它不是一个变量, 是Control类的一个公共属性。
然后发现Control类还有一个公共属性叫ClientSize, 是可读可写的, 所以可以通过这样的方式修改ClientRectangle的值:
Size tmpSize = ClientRectangle.Size;tmpSize.Height--;tmpSize.Width--;ClientSize = tmpSize;Note: ClientSize和ClientRectangle都是值类型。
- Cannot modify the return value of 'System...ClientRectangle' because it is not a variable
- “Cannot modify the return value of” “because it is not a variable”
- Cannot modify the return value of ...,because it is not a variable 错误分析与解决
- ADODB使用excel的"Cannot modify the design of table 'xxxx'. It is in a read-only database"的问题
- cannot be resolved to absolute file path because it does not reside in the file system
- cannot be resolved to absolute file path because it does not reside in the file system
- File xxx.ps1 cannot be loaded because the execution of scripts is disabled on this system
- Visual Studio cannot debug managed applications because a kernel debugger is enabled on the system
- the environment variable java_home (with the value of ) does not point to a valid jvm installation
- BACKSLASH RIGHT: SLASH This is a slash: /. Because the top of it leans forward, it is sometimes
- It is because of the existence of this spell, t
- maven构建 出错:cannot be resolved to absolute file path because it does not reside in the file system
- File C:\Temp\Test.ps1 cannot be loaded because the execution of scripts is disabledon this system.
- Can not delete a master page "This item cannot be deleted because it is still referenced by other pa
- the behavior of the UICollectionViewFlowLayout is not defined because:
- 【iOS】The behavior of the UICollectionViewFlowLayout is not defined because:
- The behavior of the UICollectionViewFlowLayout is not defined because 解决办法!
- the command could not be located because '/bin' is not included in the path environment variable
- JavaSE 5.0新特性之自动拆装箱
- uva 10047 - The Monocycle
- 程序性能提高
- css总结(一)
- Hello China V1.75成功安装到DELL的PowerEdge服务器上
- Cannot modify the return value of 'System...ClientRectangle' because it is not a variable
- Ubuntu下的截图软件Deepin Scrot
- hdu 1398 Square Coins (母函数)
- 敏捷开发“松结对编程”实践之四:日常工作篇(大型研发团队,学习型团队,139团队,师徒制度,检查点,代码审查,每日立会) .
- 图解autoscan、aclocal、autoheader、automake、autoconf、configure、make
- RedHat Enterprise Linux 6.1(RHEL)搭建ArcGIS 10.1 for Server集群(一)DNS服务器架设
- Node(5) URL and Query String
- LightOJ 1110 An Easy LCS--DP
- 母函数