473,408 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

MyBase.Closing and Me.FormClosing

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

Jul 31 '06 #1
1 3237
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).

--
Dave Sexton

<e_**********@hotmail.comwrote in message news:11**********************@h48g2000cwc.googlegr oups.com...
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

Aug 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kathy D | last post by:
I have created an mdi parent form with four children. I want to disable closing the four children but allow closing the parent form. I created a FormClosing event on each form. That event tests...
1
by: pamelafluente | last post by:
Hi, I am not clear if there is there any difference in usage between Closing (mybase) and FormClosing ? Any advice on that ? -P
4
by: Academic | last post by:
I read the Help and some of the many Google hits I got but can't find out the difference between MyBase.Closing and MyBase.FormClosing Can anyone tell me? Thanks
2
by: polocar | last post by:
Hi, suppose that you have a C# form with two buttons, that are the classical "btnOk" and "btnCancel" (besides them, of course in the form there can be many other controls). When the user clicks...
9
by: cj | last post by:
In VB2003I have been using an exit menu item that issues me.close() then Private Sub Form1_Closing took care of closing everything down. I don't see a closing event for form1 in VB2005. What...
14
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought...
3
by: sravan_reddy001 | last post by:
i want to prevent a form from closing.. to do this i want to handle the formClosing or FormClosed events. from here i want to prevent the form from closing. New instance of same form should...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
3
by: mtczx232 | last post by:
I have TabControls that Hold Forms on his TabPges (this make me easy to give ability to Designing each form in his IDE window). When form x is in middle of Edit Data Mode, I going to prevent:...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.