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()
 
Back
Top