最小化和还原窗体后,RectangleShape的锚定设置故障 [英] Anchor setting malfunctions for RectangleShape after Form minimized and restored

查看:87
本文介绍了最小化和还原窗体后,RectangleShape的锚定设置故障的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


通过将Tabt控件上的Microsoft.VisualBasic.PowerPacks.RectangleShape用作边框,通过将RectangleShape锚点属性设置为顶部,底部,左侧,右侧",我固定了外部矩形边缘和主选项卡边缘之间的距离.调整窗体大小时,RectangleShape可以正确调整大小.但是,如果将窗体最小化然后恢复,则RectangleShape的右边界和底边界将位于选项卡控件的可见部分之外.可以补救吗?必须使用RectangleShape.我正在使用VB.NET2008.

谢谢,
John.

Hi,
Using a Microsoft.VisualBasic.PowerPacks.RectangleShape on a tab control as a border, I have fixed the distance between the outside rectangle edge and the main tab edge, by setting the RectangleShape anchor property to "Top, Bottom, Left, Right". The RectangleShape correctly resizes when the Form is resized. However if the Form is minimized and then restored, the right and bottom border edges of the RectangleShape are positioned past the visible portion of the tab control. Can this be remedied? A RectangleShape must be used. I''m using VB.NET 2008.

Thanks,
John.

推荐答案

而不是使用Anchor属性,请尝试将Dock设置为Fill,将Margin设置为合适的值.
不能保证,因为我还没有测试它,但是它应该可以工作.
Instead of using the Anchor property, try setting Dock to Fill and Margin to a suitable value.

No guarantees, as I have not tested it but it should work.


感谢亨利的回复.不幸的是,似乎没有可用于RectangleShape的Dock或Margin属性.
Thanks for the reply Henry. Unfortunately there does not appear to be a Dock or Margin property available for RectangleShape.


这篇关于最小化和还原窗体后,RectangleShape的锚定设置故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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