vb.net比较两个控件的位置 [英] vb.net comparing two control's location

查看:108
本文介绍了vb.net比较两个控件的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何比较两个控件(例如标签)的位置,我以表格的形式获取了两个标签,我也采用了一个按钮,当我按下按钮时,一个标签移动了,当标签到达另一个要显示的标签位置时,我要显示消息
请帮我怎么做

how can i compare the location of two controls like labels,i hav taken two label in form,i hav also taken a button,when i press button, one label moves,when label reaches the other labels position i want to show the message
pls help me how can i do this

推荐答案

比较位置"是什么意思?位置是向量;您如何定义比较运算符.从来没有帮助MSDN页面的负责人吗?您可以花些时间而不是花几秒钟来问一个问题,而是查看诸如LocationTopRight之类的属性.看起来甚至名字都是自描述的.

—SA
What do you mean "compare the location"? Location is vector; how you define comparison operators. Never head of help MSDN pages? You waist time to ask a question instead of spend few seconds and look at the properties like Location, Top, Right. It looks like even the names are self-describing.

—SA


严重吗?您不能执行简单的If语句?
Seriously?? You can''t do a simple If statement??
If Label1.Location = Label2.Location Then



强烈建议您在VB.NET上阅读一本初学者的书,并逐步进行学习.



I would highly suggest you pick up a beginners book on VB.NET and work through it.


这篇关于vb.net比较两个控件的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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