473,804 Members | 3,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form.Close problem

hi all,

I have a problem which I believe others have experienced before, but as far
as I can see has not been resolved.

Basically, the form refuses to close. Neither clicking the 'X' button nor
calling Form.Close works. The Closing event is not thrown. The form
contains a number of controls, some of which are derived from UserControl.
The problem can be reproduced by setting certain child control properties,
but they're pretty innocuous things like the title of a graph, so I can't
see how they'd have such an effect...

A few people seem to have come across this problem. Is it a bug known to
MS? (if anyone knows of a relevant KB article I'd be very grateful! I have
looked, but couldn't find anything)

cheers,
Rob
Nov 16 '05 #1
13 1856
Call

Application.Exi tThread();

in File->Exit

--
Shak
(Houston)
"Rob Agar" <ro*****@TOOMUC HBLEEDINSPAMukf sn.org> wrote in message
news:cd******** **@slavica.ukpo st.com...
hi all,

I have a problem which I believe others have experienced before, but as far as I can see has not been resolved.

Basically, the form refuses to close. Neither clicking the 'X' button nor
calling Form.Close works. The Closing event is not thrown. The form
contains a number of controls, some of which are derived from UserControl.
The problem can be reproduced by setting certain child control properties,
but they're pretty innocuous things like the title of a graph, so I can't
see how they'd have such an effect...

A few people seem to have come across this problem. Is it a bug known to
MS? (if anyone knows of a relevant KB article I'd be very grateful! I have looked, but couldn't find anything)

cheers,
Rob

Nov 16 '05 #2
that's rather an extreme solution! =)

R

"Shakir Hussain" <sh**@fakedomai n.com> wrote in message
news:um******** *******@TK2MSFT NGP11.phx.gbl.. .
Call

Application.Exi tThread();

in File->Exit

--
Shak
(Houston)
"Rob Agar" <ro*****@TOOMUC HBLEEDINSPAMukf sn.org> wrote in message
news:cd******** **@slavica.ukpo st.com...
hi all,

I have a problem which I believe others have experienced before, but as

far
as I can see has not been resolved.

Basically, the form refuses to close. Neither clicking the 'X' button nor calling Form.Close works. The Closing event is not thrown. The form
contains a number of controls, some of which are derived from UserControl. The problem can be reproduced by setting certain child control properties, but they're pretty innocuous things like the title of a graph, so I can't see how they'd have such an effect...

A few people seem to have come across this problem. Is it a bug known to MS? (if anyone knows of a relevant KB article I'd be very grateful! I

have
looked, but couldn't find anything)

cheers,
Rob


Nov 16 '05 #3
Hi,

"Shakir Hussain" <sh**@fakedomai n.com> wrote in message
news:um******** *******@TK2MSFT NGP11.phx.gbl.. .
Call

Application.Exi tThread();

in File->Exit


I would suggest this option like a last resource - it abrubtly exits.
Instead try pinpointing the source of problem.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
Nov 16 '05 #4
Does your app use threads? Do you update the controls from the threads?

Sunny

In article <cd**********@s lavica.ukpost.c om>,
ro*****@TOOMUCH BLEEDINSPAMukfs n.org says...
hi all,

I have a problem which I believe others have experienced before, but as far
as I can see has not been resolved.

Basically, the form refuses to close. Neither clicking the 'X' button nor
calling Form.Close works. The Closing event is not thrown. The form
contains a number of controls, some of which are derived from UserControl.
The problem can be reproduced by setting certain child control properties,
but they're pretty innocuous things like the title of a graph, so I can't
see how they'd have such an effect...

A few people seem to have come across this problem. Is it a bug known to
MS? (if anyone knows of a relevant KB article I'd be very grateful! I have
looked, but couldn't find anything)

cheers,
Rob

Nov 16 '05 #5
This is a well-known bug that was introduced in RC1 of the .NET
framework. Pretty much all of my WinForms applications have "workaround
code" to get around this bug. For some odd reason, Microsoft refuses to fix
this particular bug despite the fact that people have been complaining about
it for years. Here is more information + advice:

http://www.jelovic.com/weblog/e41.htm

Nov 16 '05 #6
ever heard of it happening *without* manually removing controls? The code
I'm having trouble with has user controls on other user controls on tabs etc
etc, but they're never removed. Do you reckon adding & removing columns in
a datagrid could cause it?

I take it there's no KB article on MSDN, is there...?

cheers!
Rob

"Chien Lau" <Mo**********@g randson.pop> wrote in message
news:ej******** ******@tk2msftn gp13.phx.gbl...
This is a well-known bug that was introduced in RC1 of the .NET
framework. Pretty much all of my WinForms applications have "workaround
code" to get around this bug. For some odd reason, Microsoft refuses to fix this particular bug despite the fact that people have been complaining about it for years. Here is more information + advice:

http://www.jelovic.com/weblog/e41.htm

Nov 16 '05 #7
ever heard of it happening *without* manually removing controls?


Yes. This happened to me when using the SoftwareFX charting component,
ChartFX. This chart object offers the user the ability to manually type
values into a grid which then updates the chart. At some point, I'm guessing
that the component instantiates a little text box for the user to use when
typing. When the user is done typing, that little text box is destroyed.
Although I can't be certain, I'm guessing that at some point during the
process, the charting component creates and destroys a UserControl-derived
object. Since the designer of the control wasn't aware of this ridiculous
Microsoft bug, and because the control doesn't provide me with any feedback
as to when the control is being removed, there is absolutely no way for me
to workaround this bug. If the user decides to use this particular feature
of the chart, the form window won't close and the user is forced to use an
abrupt "End Task" to manually kill the process of the WinForms app. In the
end, I chose to simply disable this particular feature in the chart rather
than trying to teach users to manually kill the process.

The fact that this problem hasn't been addressed after all of these years is
completely unacceptable.
Nov 16 '05 #8
"Chien Lau" <Mo**********@g randson.pop> wrote in message
news:uV******** ******@TK2MSFTN GP10.phx.gbl...
ever heard of it happening *without* manually removing controls?
Yes. This happened to me when using the SoftwareFX charting component,
ChartFX. This chart object offers the user the ability to manually type
values into a grid which then updates the chart. At some point, I'm

guessing that the component instantiates a little text box for the user to use when
typing. When the user is done typing, that little text box is destroyed.
Although I can't be certain, I'm guessing that at some point during the
process, the charting component creates and destroys a UserControl-derived
object. Since the designer of the control wasn't aware of this ridiculous
Microsoft bug, and because the control doesn't provide me with any feedback as to when the control is being removed, there is absolutely no way for me
to workaround this bug. If the user decides to use this particular feature
of the chart, the form window won't close and the user is forced to use an
abrupt "End Task" to manually kill the process of the WinForms app. In the
end, I chose to simply disable this particular feature in the chart rather
than trying to teach users to manually kill the process.
ah hah! I'm using the ChartFX control too! Do you mind if I include your
post in a bug report I'm going to send to SoftwareFX?

I've found that the problem manifests after the user changes the graph
title, so I guess it's the little popup text edit box that's causing the
problem.

The fact that this problem hasn't been addressed after all of these years is completely unacceptable.


uh huh. I can't understand why MS would ignore a problem this bad.
Nov 16 '05 #9
> ah hah! I'm using the ChartFX control too! Do you mind if I include your
post in a bug report I'm going to send to SoftwareFX?


Please do! That would be awesome if they added a workaround to their
component...
Nov 16 '05 #10

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

Similar topics

1
3793
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your HTML form to. the actual form-parsing page resides on a server that's uneditable to me since it sits on an inaccessible server. my problem is more irritating than anything; everything double-submits.. when you submit the form, I've forced a...
3
2327
by: ThunderMusic | last post by:
Hi, I'm trying to have a MSN Messenger like form/app closing behavior. When I click on the X button, I only want the form to disappear and when I double-click on the notify icon or right-click on it and choose Open from the context menu, I want the form to reappear. For that, I got the point covered. Even when the form is minimize, the behavior is like MSN Messenger. But one problem arose. When I close the form (the first time), it...
19
3613
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the thing you know ;-) After discovering that access 2000 support form properties (I'm a
6
4096
by: nadeem_far | last post by:
Hello All, I am working on a .Net desktop application and I am having problem displaying a form. I am using C# and version 1.1 of the framework. here is how the code looks likes and I will appreciate if someone can tell me how to resolve this problem. Main ( Args ) { Form1 f1 = new Form1();
4
25584
by: Jason Huang | last post by:
Hi, In my C# windows form project, how do I in a formA open another formB, and close formA when formB is opened? Thanks for help. Jason
3
7704
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent form affects data in the subform. I've had this type of setup often, but I've run across a couple forms where this has caused an "enter parameter value" pop up for each reference to the parent control in the query when the main form is closed. ...
11
7178
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my mind I am wonder if this is causing my problem, but I don’t want to go through the work to convert to DAO unless I know it is truly in my best interest.) I am having problems getting a requery to show up consistently on a couple of forms. I have...
1
2554
by: fugaki | last post by:
Hi everyone I'm learning asp, and i downloaded this script to teach me how to post form data from a webpage to an access database. I put it on the server so i could make sure that it worked, and everything was fine, so i changed the variable names (the names of the form elements, and the names of the rows in access) so that it would be more correct to what i am using it for. Now once I did that, it gave me an error on line 24 which was the...
5
3317
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening the forms all at once, I'm opening them as needed. I have a main form with multiple records; and then I have a pop-up form that the user opens with button. The pop-up form contains one record relating to the current record in the main form (but...
7
2920
by: Sin Jeong-hun | last post by:
I have a dialog form which pops up from the main window using the ShowDialog() method. this dialog has no or button, and it has quite a lot of controls on it. Now, I want to close this dialog form when the user presses the escape key, but that's only when no control on the form is responsible for the escape key. For example, it has a ComboBox control, and a user can press the escape key just to close the drop down list that is being...
0
10588
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...
1
10324
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
10085
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
9161
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...
0
6857
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
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
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.