|T O P I C R E V I E W
||Posted - 27 Aug 2013 : 13:05:18
I am using the CTWX control under VB6 running on Windows XP, and periodically receive a "Too many graphs" error in a dialog box while the app is running.
This usually happens on form load, where we do a
Call CTWX1.ReconnectDataSet(0, "Line Data", pXData(0), pYData(0), 1)
call to clear the chart.
This tends to happen when the form gets unloaded and re-loaded a few times, but is very sporadic. The chart control lives inside a frame on the form. There are only 2 CTWX object instances on that form, and no others in the application.
Is there a way to force CTWX object unloads? I understand that this should happen automatically when the parent form unloads - which it does.
|2 L A T E S T R E P L I E S (Newest First)
||Posted - 27 Aug 2013 : 13:49:32
Thanks, that is helpful.
I will try removing these calls.
As for the comments regarding obsolescence, yes, I agree, but I have no control on our legacy code lifetime - so I am stuck with asking for help where I can.
||Posted - 27 Aug 2013 : 13:23:52
Sorry, but we no longer have any computers which run VB 6, so we can't attempt to reproduce the problem. The ActiveX controls were obsolete 10 years ago, which is pretty evident in that yours is the first question in almost 8 years. Time to update your compiler and charts to something more current.
Why are you calling
CTWX1.ReconnectDataSet(0, "Line Data", pXData(0), pYData(0), 1)
inside the form load function? Isn't the chart empty by default. And you can just assign default data using DefineDataSet. The ReconnectDataSet is what you use if you want to change the data in response to some other event(timer, button press, etc.), not a Form load.