Click here to Skip to main content
15,886,652 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
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
Posted
Comments
Sergey Alexandrovich Kryukov 21-Feb-13 23:57pm    
What is "expand"?
—SA

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900