Maximized ShapedForm larger than Screen

18 posts, 0 answers
  1. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 02 May 2007 Link to this post

    Hi,

    This may seem a pretty dumb question to ask, but how do you restrict a maximized ShapedForm so that it only occupies the screen space?

    Eg, when it's maximised, it's about 10pixels too large on every size, and the close button is clipped.  I added 10px of padding, but it looks stupid when the form is in a normal state.  Ideally, I am looking for a form which behaves like a normal form, but has rounded edges.

    I'm running on Vista 64-bit w/ multiple monitors - maybe this is platform specific?  The sample applications also experience this issue.

    All suggestions are welcome...

    Regards,


    Matt
  2. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 02 May 2007 Link to this post

    Update/Hack: I've added the following code to the Form's resize event. (Though this would seem to lose the rounded edges at startup)

    private Padding _oldPadding; 

    public MyForm()
    {
        InitializeComponent();
       
    _oldPadding = this.Padding;
    }


    private
    void MyForm_Resize(object sender, EventArgs e)
    {
       
    this.SuspendLayout();

        if (this.WindowState == FormWindowState.Maximized)
        {
            _oldPadding =
    this.Padding;
           
    this.Padding = new Padding(10);
        }
        else
           
    this.Padding = _oldPadding;

        this.ResumeLayout();
    }

    I'd be interested to see what others have done to solve this.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 03 May 2007 Link to this post

    Hello Matt,

    We are glad to inform you of the following actions taken to solve your problems on Vista 64-bit:

    1. There are no VirtualPC setup at the moment that can handle Vista 64-bit requirements.

    2. We ordered special hardware, it will be available and installed by our Admin team next week so we will be able to test/solve Vista 64-bit issues ASAP.

    3. There are special cases of this behavior observed even on WinXP, so we will double check our positioning logic for the shaped form also.

    Sincerely yours,
    Kiril
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 23 Aug 2007 Link to this post

    Any progress on this? I'm having the same issue.
  6. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 24 Aug 2007 Link to this post

    Hello kilhoffer,

    Thank you for your question. Yes, we have fixed this issue. It will be publicly available in our next version (Q2 2007, due in September). If this is a show stopper for you, please open a support ticket and we will send you a custom build containing fix for the issue.

     
    Best wishes,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Brian Lovejoy
    Brian Lovejoy avatar
    3 posts
    Member since:
    Mar 2006

    Posted 12 Oct 2007 Link to this post

    I am running Vista Ultimate 32-bit with a multiple monitor config and still have this issue even though I am using Q2 2007 release.  I don't know if it has any relevance, but I am running at a wide-screen resolution (1440 x 900).

    Thanks!
    Brian
  8. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 12 Oct 2007 Link to this post

    Hi Brian,

    We believe that this issue has been fixed, and we could not reproduce it using the latest version of our product. Are you sure you are using RadControls for WinForms Q2 2007 Service Pack 1? 

    Please make sure that you have removed DLLs bearing the older version from the Global Assembly Cache. Also, verify that the versions of the DLLs in the GAC are the latest ones from the Q2 Service Pack 1.

    If the problem persists after you make sure you're using the latest versions of the DLLs, please send us a sample project illustrating the behavior and we will investigate it.

    Thank you for your time. We appreciate your feedback.

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Brian Lovejoy
    Brian Lovejoy avatar
    3 posts
    Member since:
    Mar 2006

    Posted 12 Oct 2007 Link to this post

    Actually no, I do not have SP1.  Downloading now.  Hope to see some improvement in some of the UI rendering (as you can tell, been seeing some strange stuff).

    Stay tuned & Thanks!
    Brian
  10. Brian Lovejoy
    Brian Lovejoy avatar
    3 posts
    Member since:
    Mar 2006

    Posted 12 Oct 2007 Link to this post

    Got sp1 installed, no change.  Any ideas?
  11. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 13 Oct 2007 Link to this post

    Hi,

    I can confirm that this is still a issue in RadControls for WinForms Q2 2007 Service Pack 1, however it is easily fixed by changing the padding on the ShapedForm.  If you take a look at the ShapedForm for the Examples, you'll notice that they do not have the issue.  As a quick fix, you can add some padding to the form (3-4 pixels or so).  There are a bunch of other properties that you will also want to set, such as FormBorderStyle = FormBorderStyle.Sizable, which will restore the context menu in the tray.  I would recommend that you look (very) closely at the source code for the Example solution, as the default values for many RadControls are not optimal.

    If you are creating a set of solutions based on this control library, then you might want to create a new assembly that encapsulates your changes.  

     eg:

    public class VistaShapedForm : ShapedForm
    {
       public VistaShapedForm()
        {
            // Fix up properties here
        }
    }

    public class VistaGridView : RadGridView
    {
        // Fix up properties again...
    }
  12. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 15 Oct 2007 Link to this post

    Hi all,

    Matt, thank you for the useful advice.

    We made several tests with the ShapedForm on different screen resolutions and DPI. We didn't manage to reproduce this issue.

    We are attaching our test case application to this message. Can you confirm that the problem persists when you're using it? We ask you to send us your application so we can investigate this specific behavior further.

    Please don't hesitate to write us if you have any additional questions. Your feedback is important to us.

    All the best,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 17 Oct 2007 Link to this post

    Hi Jack,

    I have just run your test case, and the issue does not exist in your test case.  However, I have a tool which uses the ShapedForm and the issue still exists.  I am currently trying to find the differences between my application and the your test case.

    Interestingly, the RadRibbonBar extends past the bounds of the ShapedForm in your test case.  I removed the title bar and replaced it with a RibbonBar, and it falls off the sides by about 2 pixels when the RoundedRect shape is removed.

    I'll get back to you shortly.
  14. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 17 Oct 2007 Link to this post

    Hi Jack,

    I had uninstalled Q2 and installed Q2 SP1, the initial Q2 assemblies remained in the solution I was using.  Uninstalling the controls doesn't remove the older controls completely.

    However, while trying to diagnose the differences between the test case and my own solution, I found the following new issues:

    • The ShapedForm is incompatible with a StatusStrip - You are unable to resize a form, even though the StatusStrip indicates that you should be able to.
    • When a ShapedForm with a RadTitleBar is maximized, the RadTitleBar incorrectly allows the user to resize the form.
      • Double clicking the title bar to restore the form to a maximized state also fails - the form seems to remember the coordinates from the buggy resize.
    • The default value for the ShapedForm.FormBorderStyle = FormBorderStyle.None, which is seldom useful - The system tray's context menu fails to appear with this value in place.
      • The default value for this property should be FormBorderStyle.Sizable.


    Telerik does not provide any control which simulates a StatusStrip and I find that Forms without status bars look weird.  What is the most appropriate Telerik control to use for a status bar?

    Cheers,

    Matt

  15. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 18 Oct 2007 Link to this post

    Hello MattLynch,

    Thank you for reporting these issues. We will provide a StatusStrip control in our next major release Q3.

    All other issues are recorded and will be fixed for the next service pack. In order to have StatusStrip and allow form resizing of ShapedForm, do not dock the StatusStrip at the bottom of the form. Instead, anchor it and leave some free space.

    If you insist on using a RadControl, use RadToolStrip.

    Thank you for your time. Please contact us again, if you have additional questions.

    All the best,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  16. MattLynch
    MattLynch avatar
    20 posts
    Member since:
    Jan 2007

    Posted 18 Oct 2007 Link to this post

    Hi Jack,

    While you are there, are you able to get the Text property from the RadRibbonBar to sync with the ShapedForm's Text property? 

    There wouldn't be many times where the window's title would be different from the title displayed in the task bar - it would always be a bug.  At the moment, you need to set both properties in order for a application to look right - when you forget, the application looks really, really wrong.

    Regards,

    Matt
  17. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 19 Oct 2007 Link to this post

    Hello MattLynch,

    At this time RadRibbonBar's Text property can be synchronized only manually. We will correct this in our next service pack.

    Thank you for the suggestion. We added 500 points to your account.

    Don't hesitate to contact us if you have further questions.

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  18. Cathal
    Cathal avatar
    3 posts
    Member since:
    Jul 2012

    Posted 02 Aug 2012 Link to this post

    Hi,

    I was wondering if this issue have been fixed for Windows 7? When i Maximize the shaped form it is larger than the screen.

    Thanks,
    Cathal.
  19. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 06 Aug 2012 Link to this post

    Hi Cathal,

    Since we are still unable to reproduce the issue, I kindly ask you to provide us with a sample in the General Feedback thread you have opened.

    Additionally, I kindly ask you to use one support channel to contact us. Posting the same question several times slows down our response time. Thank you for your understanding and cooperation.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready