且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在widows vb.net framework 2.0中单击按钮展开表单

更新时间:2023-12-06 12:19:40

如果我理解你的话,你需要的一切要做的是设置表格''大小属性 [ ^ ]。尺寸由高度和宽度组成。如果你愿意,可以单独设置它们。



如果你有一个想要显示或隐藏的面板,你也可以这样做。您可能需要在表单上稍微移动一下,这样您就可以查看控件的anchor属性和 location property [ ^ ]您在表单上有的控件,以了解如何移动它们。



此外,锚属性 [ ^ ]当你希望控件在调整大小时用窗体拉伸时非常有用。



希望这会有所帮助。

Hello all,

Can we expand form on a buttion click in vb.net , if we use panel with show/hide option that part will always be showed on form . Pl. share your experience.

Thanks

If I understand you correctly, all you''d need to do is set the form''s size property[^]. The size consists of the height and width. You can set them individually if you want to.

If you have a panel that you want to show or hide, you can do that too. You may need to move things around a bit on your form so you''ll want to look into the anchor property of the controls and the location property[^] of controls that you have on your form to see how to move them around.

Also, the anchor property[^] is useful when you want controls to stretch with the form when it is resized.

Hope this helps.