MyBase.Closing and Me.FormClosing

  • Thread starter Thread starter e_man_online
  • Start date Start date
E

e_man_online

Hi,

I have a VStudio 2003 project that had code like:

Private Sub frmAnyForm_Closing(<parameters list...>) Handles
MyBase.Closing

and this project was converted to .NET 2.0
Everything compiled and worked no warnings or errors are left, but I
realized that the closing event in .NET 2.0 has changed to:

Private Sub frmAnyForm_FormClosing(<parameters list...>) Handles
Me.FormClosing

the MyBase.Closing event has been eliminated.

My question is: how is it possible there's no compiler error/warning
and the forms are working even though the event doesn't exist anymore?

Is it required to change the old event handlers to the new ones or not?

Thanks in advance,

Rick
 
Hi Rick,

The Closing event is marked as obsolete in 2.0, but it is still present on the Form class definition. I'm not a VB programmer but I
have the distinct feeling that VB is simply refusing to give you intellisense for this event because of its deprecated nature. I
think there might be a setting that you can toggle off in Tools-->Options to display classes and members marked with
ObsoleteAttribute (or at least EditorBrowsableAttribute).
 
Back
Top