Click here to Skip to main content
15,893,368 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to set form size automatically?

Whenever we create a project we set the button and lable textbox.

After compilation we execute and when I click the resize button the textbox and lable is hidden.

Or, when I create a setup and then install the project on another compute they also hide in minimize or restore time.

Please solve this problem.
Posted
Updated 8-Sep-10 23:30pm
v2
Comments
Dalek Dave 9-Sep-10 5:30am    
Edited for Grammar, Syntax and Spelling, but as for the question?

You can try a few things,

1. Set the AutoSize property of the form to fit the form to display all its contents.

2. Physically set the Size property of the form to fit your contents.

Hope this helps.
 
Share this answer
 
Comments
Dalek Dave 9-Sep-10 5:31am    
Good call. I was unsure of what he wanted until I read your answer.
Hi amit,

In your question i am understand to show the form in maximum size.

Just to set your form WindowState property into Maximized.


To hide Maximum & Minimum button means
using MaximizeBox & MinimizeBox property set 'False'


Thanks :)
 
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