473,750 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form1.closing in VB2005???

cj
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 takes it's place?
Dec 13 '06 #1
9 2578
Form1.FormClosi ng()

cj wrote:
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 takes it's place?
Dec 13 '06 #2
TP
FormClosing

cj wrote:
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 takes it's
place?
Dec 13 '06 #3
It's called FormClosing now. (Irritating, isn't it?)

There's also an event called FormClosed that will trigger *after*
the form is closed.

Robin S.
--------------------------------------------------
"cj" <cj@nospam.nosp amwrote in message
news:ev******** ******@TK2MSFTN GP02.phx.gbl...
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 takes it's
place?

Dec 13 '06 #4
cj
Thanks, TP and Izzy! That was easy.

Izzy wrote:
Form1.FormClosi ng()

cj wrote:
>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 takes it's place?
Dec 13 '06 #5
cj
Irritating, yes. I hope they had a good reason for it but ...

Yea, I knew "closed" existed but haven't had a use for it yet.
RobinS wrote:
It's called FormClosing now. (Irritating, isn't it?)

There's also an event called FormClosed that will trigger *after*
the form is closed.

Robin S.
--------------------------------------------------
"cj" <cj@nospam.nosp amwrote in message
news:ev******** ******@TK2MSFTN GP02.phx.gbl...
>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 takes it's
place?

Dec 13 '06 #6
cj wrote:
Irritating, yes. I hope they had a good reason for it but ...
FormClosing has an argument that tells *why* the form closed.

Dec 13 '06 #7
That's a good thing. But they didn't have to change the
name from Closing to FormClosing. (Although actually,
I guess they changed it from Unload to FormClosing). They
didn't change the Load event to FormLoading. Where's the
consistency? Oh, the drama of it all! ;-)

Robin S.
----------------
"Chris Dunaway" <du******@gmail .comwrote in message
news:11******** **************@ j72g2000cwa.goo glegroups.com.. .
cj wrote:
>Irritating, yes. I hope they had a good reason for it but ...

FormClosing has an argument that tells *why* the form closed.

Dec 14 '06 #8
RobinS wrote:
That's a good thing. But they didn't have to change the
name from Closing to FormClosing. (Although actually,
Since the Closing event is still present (though deprecated), perhaps
they changed the name to avoid causing any further backwards
compatibility problems.

Dec 14 '06 #9
Ah, I see. Fair enough. Well, they could call it "George"
and I'd still use it. I'm just *that* flexible. ;-)

Robin S.
----------------------------
"Chris Dunaway" <du******@gmail .comwrote in message
news:11******** *************@7 3g2000cwn.googl egroups.com...
RobinS wrote:
>That's a good thing. But they didn't have to change the
name from Closing to FormClosing. (Although actually,

Since the Closing event is still present (though deprecated), perhaps
they changed the name to avoid causing any further backwards
compatibility problems.

Dec 14 '06 #10

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

Similar topics

1
1277
by: thomasp | last post by:
I get the following error when closing VB2005 beta 2. Everything runs fine. Just wondering what the error is and how to eliminate it. ******** The control System.Windows.Forms.MdiClient has thrown an unhandled exception in the designer and has been disabled. Exception: Property accessor 'Locked' on object 'stsMain' threw the following exception:'Object does not match target type.'
4
4234
by: thomasp | last post by:
Using VB2005 Beta 2 If I use Application.Run(New Form1) in the below code. Then code like TAM.Form1.rtbAllAcq.Text = aryStatistics(0) that is used to update a richtextbox on Form1 does not work. There is now error but the contents never change. If I use Application.Run(Form1) then all works fine. I assume that this is because New creates a new form that TAM.Form1 does not reference. Is this correct? Will the following code cause me...
3
5944
by: Karan | last post by:
I am calling finalize when form2 loads and deactivates form1 which closes form1. However, same thing is not happening in form2 because finalize is already called. Does anybody has solution to it. This code works well for splash screen. I searched alot on net for codes but they don't work. for example- (1) Public Sub CloseForm(formType As System.Type) For Each oForm as System.Windows.Forms.Form in me.MdiParent.MdiChildren If...
6
4908
by: ProteusGak | last post by:
Hi, new membership and first post. I am working in VB 2005, windows forms and would like to know how to open form2 based on the user's selection from a combobox or listbox from say, form1. Thank you, PG
0
1642
by: LostInMD | last post by:
Hi, I am loading word with vb2005 customized commandbars. During the load of the Word exe, the exe automatically opens a new document. I am having difficulty "activating" the open document within the word application after I close the dialogbox (that is loaded upon the user clicking one of the commandbar buttons). After I close my dialog box, I see the ibeam cursor in my word document, however it is not flashing, just a solid...
3
1668
by: Arne Beruldsen | last post by:
The migration from VB6 is anything but easy. Ok...I have an introductory form (start-up is via sub main) and then several succeeding forms which gather some info. As soon as the info is gathered they can be closed for good, Based on the info...I refer to a module which loads another form and possibly several others. In VB6 as soon as all the forms had been processed ... the module would send me back to my intro form. For some...
1
1308
by: John Dann | last post by:
Running VB2005 on Windows XP SP2: I've started to get type initializer errors on Form1 whenever I try to run a project within the IDE - this never used to happen. I can open the project within the IDE and see all the code, it's just trying to run the app that triggers the error. Projects are stored on a network drive, which I'm fairly sure is the source of the problem. I'm guessing that some recent Windows Update download has changed...
3
1568
by: Andy | last post by:
So, I'm playing around with VB and tries to get the hang things. When I add a form to my application, and I begin to add code to the form, it stars with " Public Class form1" But is Form1 a class on its own or is it an object based on the form class in the framework? What I guess I'm asking is if I treat Form1 as a class or an object derived from a class. /A.
0
9575
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9394
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6803
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.