Re: Form.Close problem
rockclimber90_at_hotmail.com
Date: 07/28/04
- Next message: Kyril Magnos: "Re: Timer and refreshing the UI"
- Previous message: Kyril Magnos: "Re: Extract exe file icon."
- In reply to: Chien Lau: "Re: Form.Close problem"
- Messages sorted by: [ date ] [ thread ]
Date: 28 Jul 2004 14:25:54 -0700
I can't reproduce the problem consistently in .NET 1.1, even the
sample from
Dejan Jelovic (as is) doesn't do it.
I'm prety sure however, that I've seen it happen, just not when I want
to reproduce it :-(
What we did now was unhook all event handlers before removing the
control as suggested by JMW, since this can't do any bad.
If the workaround presented by Dejan Jelovic is necesary, then Chien
is right, I don't think we can do it from our control as we can not
call OnControlRemoved.
We could provide you with a new event fired right before the control
is removed and give it to you, however, this will be very obscure and
hard to explain to most of our users.
If we determine that the problem still happens in .NET 1.1 even after
unhooking the events, we may decide to add this event anyway, so far I
can't so I'm holding-up this change.
If you are interested, contact our support dept., get the HotFix and
if you can reproduce the problem with the latest hotfix and .NET 1.1
then let me know but please tell me how to reproduce it, I had cramps
in my hand the other day from clicking the close buton so many times
trying to reproduce this.
Frank
"Chien Lau" <MontherInLau@grandson.pop> wrote in message news:<esXc0dCdEHA.3420@TK2MSFTNGP12.phx.gbl>...
> > SoftwareFX have promised to include the workaround in the next ChartFX
> > service pack :)
> >
> > btw, they say they can't reproduce the problem using .NET 1.1. Do you
> know
> > if it manifests in 1.1? I only have .NET 1.0...
> >
>
> Yes, it manifests in 1.1 as well. My personal opinion is that SoftwareFX
> will have difficulty coming up with a workaround. The workaround to this
> problem would require their component to navigate up through the hierarchy
> of windows to the top level form. On that top level form, the
> OnControlRemoved() method must be called when ChartFX destroys its internal
> window(s)/control(s). The problem, of course, is that OnControlRemoved() is
> 'protected', not 'public', so I'm not sure if the ChartFX component will be
> able to call this method to implement the workaround.
>
> In my own code, all of my top level forms implement a custom interface
> called "IWinFormsHack" which I define as follows:
>
> internal interface IWinFormsHack{
> void DoOnControlRemoved(Control ctl);
> }
>
> ...where my implementation of DoOnControlRemoved() simply delegates to
> the form's OnControlRemoved(). Since I can ensure that my top level forms
> implement this interface, the workaround becomes possible. Since ChartFX
> can't make any assumptions about the user's top level form, it becomes much
> more difficult for them to implement the workaround.
- Next message: Kyril Magnos: "Re: Timer and refreshing the UI"
- Previous message: Kyril Magnos: "Re: Extract exe file icon."
- In reply to: Chien Lau: "Re: Form.Close problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|