TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hugo_charbonneau
NA
3
0
Form resize not working correctly after upgrading to Framework 1.1
Aug 17 2004 12:01 PM
Hi all, I Generic form contains two panels. The lower panel (with fixed height) contains buttons, the upper panel is empty but set to fill the rest of the form space. In this form I have a function to set any User control I want in the upper panel. Then it resizes the form accordingly to see the entire user control and the lower button panel. Here is the function: public void SetControl( Control ctrl ) { _upperPanel.Controls.Add( ctrl ); // Size the window according to the new panel int deltaW = ctrl.Width - _upperPanel.Size.Width; int deltaH = ctrl.Height - _upperPanel.Size.Height; this.Size = new Size( this.Size.Width + deltaW, this.Size.Height + deltaH ); } This was working perfectly with .NET 1.0. However I noticed that after upgrading to .NET 1.1, the height of the form was not working anymore. It was missing a little. What is weird is that the width is resizing correctly. And if I copy the resizing code above (3 last lines) twice in the same function it works. Any ideas? Thanks, Hugo
Reply
Answers (
2
)
envoke different form with a timer
C# How can I delete things which I drew with GDI+