Why do I need to show() before I set size or location?

  • Thread starter Thread starter John
  • Start date Start date
J

John

If I don't show a form (form.show()) before I set the size and
location it doesn't appear the correct size (location is right). It
appears slightly bigger. This seems to only happen when the form has a
status bar.

Is this a bug?

John
 
I'm now performing research on the issue. I will update you as soon as
possible.

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
After extensive research on the issue, I can't reproduce the problem on my
side.

My OS: Windows XP Pro with SP1a
Visual studio .NET 2003

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Duke,

I save the current window size and location to the registry when my
app exits. I then read these values in when the app restarts.

I have found that if I don't call show() before I set the size or
location the window is not re-created with the same size or location
as it was when the app previously exited.

Does this help?

I'll generate a sample app if that would help.

John
 
I think there should be no problem if the value retrieved from the registry
is correct. In order to test it, you can dump out the value you retrieved
from the registry.

Yeah, you should provide a sample to reproduce the issue.

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top