[英]Change the size of the button with size of the window in vb.net
如何将表单中任何按钮的大小与窗口的大小连接起来,使其与窗口的大小成比例地变化?
Dock and anchor properties on the button should do the trick. 按钮上的Dock和anchor属性应该可以解决问题。
If all else fails, you could use the Resize event of the window and resize the buttons you'd like accordingly in that event. 如果所有其他方法均失败,则可以使用窗口的Resize事件,并在该事件中相应地调整所需按钮的大小。 There's more to be found on this event right here: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.resize.aspx#Y0
在这里可以找到有关此事件的更多信息: http : //msdn.microsoft.com/zh-cn/library/system.windows.forms.control.resize.aspx#Y0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.