Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Using a Microsoft.VisualBasic.PowerPacks.RectangleShape on a tab control as a border, I have fixed the distance between the outside rectangle edge and the main tab edge, by setting the RectangleShape anchor property to "Top, Bottom, Left, Right". The RectangleShape correctly resizes when the Form is resized. However if the Form is minimized and then restored, the right and bottom border edges of the RectangleShape are positioned past the visible portion of the tab control. Can this be remedied? A RectangleShape must be used. I'm using VB.NET 2008.

Thanks,
John.
Posted

Instead of using the Anchor property, try setting Dock to Fill and Margin to a suitable value.

No guarantees, as I have not tested it but it should work.
 
Share this answer
 
Thanks for the reply Henry. Unfortunately there does not appear to be a Dock or Margin property available for RectangleShape.
 
Share this answer
 
Comments
Henry Minute 1-Nov-10 20:54pm    
OK. Sorry about that.

FYI. If you had added a comment to my answer (as I am doing here), I would have got an Email to tell me there was a comment. As it is I only discovered this by accident. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900