Controlbox property and Form event Activated and Deactivate

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

I found that to set the form property "ControlBox" to false will
trigger "Form.Activated" event and "Form.Deactivate" event to fire.
Is it a bug in VB.NET or designed this way?

Thanks,
Ryan
 
This is unfortunately ByDesign. When you set this.ControlBox (or any other
property on Form that alters the Form window's border style) the Form is
recreated internally. This is a platform limitation and this is why you get
the deactivate and activate events.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top