This is a migrated thread and some comments may be shown as answers.

ShapedForm in VS2008 Designer

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
artur
Top achievements
Rank 1
artur asked on 06 Aug 2008, 01:52 PM

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

1 Answer, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 07 Aug 2008, 01:19 PM
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.
Tags
General Discussions
Asked by
artur
Top achievements
Rank 1
Answers by
Angel
Telerik team
Share this question
or