在Form1上有一个Picturebox控件,在Picturebox控件的上一层有多个Button控件,如何获取在这个Picturebox控件上一层,有多少个Button控件?急用,在线等,一有答案,马上结贴,顶贴有分加!
解决方案 »
- 求点wpf silverlight 画柱形图 折线图 饼图的资料例子。
- 有关psftp.exe工具和SFTP上传
- 最少化或者其他窗口覆盖后绘制的图形不见了。
- !S!WCRTESTINPUT000003!E!是什么意思
- 在C#中如何将日期时间分别转化为byte[]
- 怎么复制DataGridView选中的内容到粘贴板上?
- 100分请教 : 如何在运行时候更改水晶报表的模板文件 (net2003自带的) 在线等
- 高分求教DevExpress.XtraGrid.GridControl控件的问题
- 关于虚实例方法与非虚实例方法的调用
- asp.net怎么选择数据库表、字段生成XML文档
- [高分求助]s1=string.Concat(s1,s2) 与 s1+=s2 的区别
- 线程的疑惑
不过你可以对Form中的Button控件的Location与PictureBox的ClientRectangle属性判断,如果Location在ClientRectangle内,则可以判断是在PictureBox内。
button.left >= picturebox.left && button.top >= picturebox.top &&
button.left + button.width <= picturebox.left + picturebox.width &&
butotn.top + button.height <= picturebox.top + picture.height
button.left >= picturebox.left && button.top >= picturebox.top &&
button.left + button.width <= picturebox.left + picturebox.width &&
butotn.top + button.height <= picturebox.top + picture.height