Restricting Control Height

  • Thread starter Thread starter T Cordon
  • Start date Start date
T

T Cordon

I have seen some controls that disable the height option at design time, you
cannot drag and change it's height how can this be done?

Thanks
 
override the OnResize event and set the height in it that will disable it in
a simple way.
 
Thanks. I did that but the control flickers when resized. I wish to find a
way to totally disable the option for the developer to resize it at design
time dragging from the top or bottom.

Thanks
 
Try overriding the WndProc and trap the WM_SIZING message. Also to prevent
flickering of your control, add this in your Sub New:

Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.UserPaint, True)
Me.UpdateStyles()
 

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

Back
Top