Resizing Custom Controls

B

Bjoern Feld

Hi,

I managed to create my 1st custom control with designer support.
I ran into the following problem:

I place the control on a form and it is displayed correctly.
When I try to resize the control on the form, i.e increasing the size only
the part corresponding to the original size is redrawn correctly. The rest
not.
Decreasing the size everything works correct.
I handle the OnResize event in my control and the ClientSize Property is
updated correctly. I made sure to call Invalidate and the OnResize base
function.
Inside my OnPaint Handler I use OffScreen buffering creating a bitmap object
using ClientSize to specify the size of the bitmap.

I'm fairly new to the CF. Is there something I'm missing?

TIA Bjoern
 

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