Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Guys,

An issues is observe relevant to form size. A sub form is called from main application and it's size differs with the size mentioned at designed time. As a result, it didn't show the buttons at bottom to perform actions.

Find sample code in attachment.

Please, Help me in this regard.



This is a subtle issue and I think from the information provided, it may be difficult to figure out where the problem is lurking. One option is to debug the application and track the execution of code to find out where the form size is getting changed. Another option may be to subscribe to the SizeChanged event of the form concerned, put a break point in the event handler and when the execution halts there, observe the callstack to track the code which might have changed the form size. Hope this may be of some help to resolve the issue.
Share this answer
Sergey Alexandrovich Kryukov 16-Apr-12 22:39pm    
I like the second idea, my 5.
VJ Reddy 16-Apr-12 23:42pm    
Thank you very much, SA.
You will two options
1. You runtime size change height and width.
2.You set win form auto size property is true and auto scroll property is both or vertical.

I hope your problem is solve.
Share this answer
Dear VJ Reddy and Rakesh,

Thanks for good advise.
But, what I figure out is simple that it is all about setting the location of sub form in main application button click. But...sub form didn't loaded yet and according to win form life cycle, we should set location after load.
So, I do same and as a result my issue resolved.

Thanks for support.

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