RE: Windows Form Does Not Close When Using 'X' on ControlBox on Fo
- From: Jon Ebersole <JonEbersole@xxxxxxxxxxxxx>
- Date: Thu, 2 Nov 2006 16:02:01 -0800
Jeff, Thanks for the response. Let me see if I can try to duplicate the
problem in a test project. My project uses a lot of Backgroundworker threads
and other stuff that makes it a little more difficult to provide to you. It
has other class libraries I made etc. I'll try to get that to you within the
next couple days.
As requested...
I am using the following line of code in File->Exit , which always works
without a hitch...
Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e
As EventArgs) Handles ExitToolStripMenuItem.Click
Global.System.Windows.Forms.Application.Exit()
End Sub
Remember 2 things...
- I 'fixed' my problem (ok.. workaround, you got me) by adding the above
line to my FormClosing Event Handler.
-the only time my form doesn't close all the way is when I use the 'X' in
the controlbox. Any calls that I explicitly put in my project to close the
form work just fine. The code-behind stuff in the Microsoft Generated
sections don't do the exact same things as
Global.System.Windows.Forms.Application.Exit() does. I think somebody missed
something somewhere in there.
Again, I'll try to duplicate the problem with a much smaller and more
concise code set.
--
Jon Ebersole
Microsoft Certified Solution Developer
""Jeffrey Tan[MSFT]"" wrote:
Hi Jon,.
I am not sure if you still need help on this issue. I want to help you find
out why clicking "X" controlbox on the form will not close the form.
Can you tell me what code you are execting in File->Exit menuitem handler
to implement the form closing function?
I suspect there is some code in your form that prevents the form from
closing while clicking the "X" of the form. Can you provide a sample
project to demonstrate this problem? It would be helpful for me to find out
the root cause. You may send the sample project to me at
jetan@xxxxxxxxxxxxxxxxxxxx(remove "online.").
I will wait for your further reply, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- RE: Windows Form Does Not Close When Using 'X' on ControlBox on Fo
- From: "Jeffrey Tan[MSFT]"
- RE: Windows Form Does Not Close When Using 'X' on ControlBox on Fo
- References:
- RE: Windows Form Does Not Close When Using 'X' on ControlBox on Form
- From: "Jeffrey Tan[MSFT]"
- RE: Windows Form Does Not Close When Using 'X' on ControlBox on Form
- Prev by Date: Re: Scrolling controls using custom buttons
- Next by Date: Re: How to get system "single-click" and use it in a TreeView
- Previous by thread: RE: Windows Form Does Not Close When Using 'X' on ControlBox on Form
- Next by thread: RE: Windows Form Does Not Close When Using 'X' on ControlBox on Fo
- Index(es):
Loading