如何在c#中将控制位置值在运行时获取到字符串变量 [英] How to get control location value to string variable at runtime in c#

查看:66
本文介绍了如何在c#中将控制位置值在运行时获取到字符串变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何在c#windows窗体中在运行时将picturebox位置值转换为字符串变量。请帮我

解决方案

试试这个,

在这个,玩具获取图片框控制位置(X和Y坐标)在窗体上。



 Point pl = pictureBox1.Location; 
string picturebox_X = pl.X.ToString();
string picturebox_Y = pl.Y.ToString();


尝试 string path = PictureBox.ImageLocation;

Hi,

How to get picturebox location value to string variable at runtime in c# windows form. Please help me

解决方案

Try this,
In this, toy get picture box control location (X and Y co-ordinate )on form.

Point pl = pictureBox1.Location;
string picturebox_X = pl.X.ToString();
string picturebox_Y = pl.Y.ToString();


Try string path = PictureBox.ImageLocation;


这篇关于如何在c#中将控制位置值在运行时获取到字符串变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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