ShapedForm in VS2008 Designer

2 posts, 0 answers
  1. artur
    artur avatar
    2 posts
    Member since:
    Jun 2008

    Posted 06 Aug 2008 Link to this post

    I have a problem with ShapedForm (RoundRectForm) in VS2008 designer. Every time I open it in design mode, the size of the form changes (usually height grows). It happens even if there is nothing on the form. However, if there is no shape for the form defined, everything is OK (I didn't check other shapes). 

    The size is also different from designed, while app is running. Is there any way to avoid this behaviour?

    best regards

    artur

  2. Angel
    Admin
    Angel avatar
    121 posts

    Posted 07 Aug 2008 Link to this post

    Hello Artur,

    Try to set FormBorderStyle to None.
    The shaped form can be resized by default and FormBorderStyle does not affect its resizing capabilities.
    To disable the resizing of a ShapedForm you have to override GetHitTest():

    protected override int GetHitTest(Point point)  
    {  
        return 1;// HTCLIENT  

    If FormBorderStyle is None and your ShapedForm still resizes when opened in design-time, I will need a demo project in order to investigate the issue.

    Regards,
    Angel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top