Form automatically resizing

13 posts, 0 answers
  1. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 28 Apr 2010 Link to this post

    I'm sure the answer is already out there somewhere, but I couldn't seem to find it.

    I seem to have this same problem on both of my development machines. 

    When using a RadForm, the form resizes at random. I make the form to be something like 800x400, but when i tab to code and then back, or when i compile and launch the application, the size is 800x200.

    I'm sure that i've done something wrong, but not real sure what it is. 


    thanks!
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 29 Apr 2010 Link to this post

    Hello Phillip,

    Thanks for contacting us and for reporting this issue.

    Could you please give us further details on the case like whether you have set the AutoScaleMode property of the form to Font? If yes, please try setting it to None and see whether the issue will persist.

    Thanks for your time.

    Best wishes,
    Deyan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 29 Apr 2010 Link to this post

    I checked the autoscalemode and it was set to Font, however when i changed it, It still did the same thing.
    Please view the attached images to see what I mean. 
  5. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 03 May 2010 Link to this post

    Any other suggestions? this problem is still happening. It seems to be during the OnPaint or something. If I minimize and restore the form is about an 1.5" shorter than before. See Attached document.

    Thanks. 
  6. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 04 May 2010 Link to this post

    Hi Phillip,

    Since we are not able to reproduce the issue on our side, we would like to kindly ask you to prepare a simple Windows Forms application that reproduces the case and send it to us in a new support ticket. In this way we will be able to directly debug it and see what goes wrong.

    Thanks for the understanding and for your time.

    Regards,
    Deyan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Aaron
    Aaron avatar
    2 posts
    Member since:
    Jan 2007

    Posted 12 Aug 2010 Link to this post

    Hi,
    I am also experiencing this problem.  It is fine on my dev machine but when  i give the app to someone else to run on thier machine they get the issue.  They get the issue on just opening the app but then if they change the screen they are viewing it on (dual screen) then the window repaints differently .  I have tried matching resolutions with the other machines and opening. Mine is still ok and theirs still has the issue??? also tried running it on a machine exactly the same as mine and they get the probelm as well. 

    Are there any solutions to this yet??  If you need an exmple give me an email address and i can send you my project...  I have also created a support ticket for this as it is urgent...

    Thanks Aaron
  8. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 12 Aug 2010 Link to this post

    Aaron,
    This may  or may not be the same issue that you are experiencing. They did eventually send me a work around to keep the issue from happening. the cause of the issue was because I had a Large Icon in my title bar (128x128, see screenshot). Each time the screen painted, the application did not take the large icon size into account and therefore paints the form smaller than it should. As a workaround, you must insert this block of code:

    #region Overrides
         private const int WM_SETICON = 0x80;
         protected override void WndProc(ref Message m)
         {
             base.WndProc(ref m);
     
             if (m.Msg == WM_SETICON)
             {
                 this.SetClientSizeCore(
                      this.ClientSize.Width,
                      this.ClientSize.Height);
             }
         }
         #endregion


    It seems to be working for me. 
  9. aaron
    aaron avatar
    5 posts
    Member since:
    Sep 2008

    Posted 16 Aug 2010 Link to this post

    Hello

    Thanks for the help but i tried the code and it didnt work.  There seems to be a resizing heiarchy problem and the controls are not auto resizing based on their parent control.

    Many thanks

    Aaron
  10. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 17 Aug 2010 Link to this post

    Hello Aaron,

    Please refer to the support ticket you sent us regarding deploying your application on machines with different DPI settings and let us know if it is helpful.

    All the best,
    Deyan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Hatam
    Hatam avatar
    2 posts
    Member since:
    Mar 2014

    Posted 24 Mar 2014 Link to this post

    Hi ,
    i have a rad form and in design mode when i close and open it form solution explorer the height of the form reduces exact 3 pixels
    Thanks
  12. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 26 Mar 2014 Link to this post

    Hi Hatam,

    Thank you for writing.

    We already have similar issues reported in our Feedback Portal. However in all the cases the form size is growing. This is why I want to kindly ask you to take a look at these cases and try to find any connection with your case. The items are located here and here.

    Also the provided information is not sufficient for me to reproduce the observed behaviour. This is why I want to kindly ask you to open a support ticket. In it you can provide us with your project together with the exact steps that I need to take in order to reproduce the issue on my end. 

    Once I am able to do that, I will be able to investigate it and provide you with adequate support.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  13. Hatam
    Hatam avatar
    2 posts
    Member since:
    Mar 2014

    Posted 28 Mar 2014 Link to this post

    Hello
    I was able to fix the issue by lowering Font size of the Title bar for my forms , when it's higher then like 9.5pt , the title bar can't handle it and makes this bug , i hope this helps for others with the same problem too.
  14. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 01 Apr 2014 Link to this post

    Hello Hatam,

    Thank you for sharing your experience with community. However I am still not able to reproduce the observed behaviour on my end. if you want you can send us a support ticket with the exact case explained which will allow us to further investigate this case log it if necessary.

    Do not hesitate to contact us if you have other questions.
     
    Regards,
    Dimitar
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready