Limiting ClientRectangle in UserControls

B

Brian Adams

I have a UserControl which draws using GDI+ on the top 40
pixels or so. Everything below that is available for
users to place other controls on (like buttons, etc.)
What I need to be able to do is lower the ClientRectangle
so that other controls can't draw above the 40 pixel
line. Basically, I want to make x=0, y=40 on the
UserControl look like x=0, y=0 to the client control.

Limiting the DisplayRectangle doesn't work, because the
designer still allows controls to be placed over the top
40 pixels.

Thanks!
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top