Problem when unloading forms containing TChart control

TeeChart for ActiveX, COM and ASP
Post Reply
Ray
Newbie
Newbie
Posts: 7
Joined: Wed Dec 12, 2007 12:00 am

Problem when unloading forms containing TChart control

Post by Ray » Tue Jul 08, 2008 2:32 am

Hi,

We are currently experiencing some problems when unloading forms that contain TChart controls. We are using TChart in a VB6 environment and we have done nothing in the code other than replace the v6 TChart object with the v8 TChart control object.

Specifically, we have 2 forms loaded (FormA and FormB) each of which contains a TChart control.

FormA has a Form_Unload event which unloads FormB:
...
...
Private Sub Form_Unload(Cancel As Integer)
Unload FormB
End Sub
...
...

If FormB has the focus and we close FormA (by clicking the default Close button at the top right of FormA), FormA's Form_Activate event is triggered during FormA's Form_Unload event.

Previous to upgrading to the v8 TChart control, FormA's Form_Activate event was not triggered for the scenario described above. This has been observed with both TeeChart8.ocx and TeeChart8Langs.ocx

Any assistance would be greatly appreciated.

Thanks,
Ross

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jul 08, 2008 8:05 am

Hi Ross,

Could you please arrange a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ray
Newbie
Newbie
Posts: 7
Joined: Wed Dec 12, 2007 12:00 am

Post by Ray » Tue Jul 08, 2008 11:45 pm

Hi Narcís,

Thanks for your prompt reply. Ross has asked me to provide you with an example project that demonstrates the problem we are experiencing.

I have uploaded an example project to your upload page as directed. The name of the file is FormUnloadBug.zip

If you unzip and run the example project:

1. Click Command1 on the main form to load FormA and FormB (FormB should have the focus)
2. Immediately click the close button at the top left of FormA which is in the background behind FormB

You should get an error message displayed which is related to execution of code within FormA's Form_Activate event. It appears that FormA's Form_Activate event has been triggered whilst in the middle of FormA's Form_Unload event.

This has been observed with both TeeChart8.ocx and TeeChart8Langs.ocx but was not observed with TeeChart6.ocx

Please let me know if you need more information.

Best Regards,
Raymond Oreo

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jul 09, 2008 8:47 am

Hi Raymond and Ross,

Yes, you are right. Something strange is happening here. I've added it to the wish list to be investigated asap. (TA05013203)
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Ray
Newbie
Newbie
Posts: 7
Joined: Wed Dec 12, 2007 12:00 am

Post by Ray » Wed Jul 09, 2008 10:46 pm

Thanks Yeray.

Best Regards,
Ray Oreo

Post Reply