设置控制位置时出错 [英] error when set control location

查看:68
本文介绍了设置控制位置时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置按钮控件的位置值时遇到错误.

这是我的代码在这里

Hi I am facing error when I set location value of button control.

This is my code here

Button2.Location.x = 500
Button2.Location.y = 230



当我为该控件分配x和y值时,我遇到这种类型的错误



when I am assign x and y value to that control I am facing this type of error

推荐答案

读取"x"和"y"值仅.

设置Location属性

The ''x'' and ''y'' values are read only.

To set the Location property

Button2.Location = New Point(500, 230)



一口气设置整个位置.



Set the whole Location in one go.


这篇关于设置控制位置时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆