[RESOLVED] Program Crashing
Howdy folks
I have, hopefully a quick question
I am working with Paolo Giacomuzzi's AppBar application. I have seen it floating around here and at Planet Source Code. Everthing is working so far; but for 1 annoying issue. Whenever I end the app, VB6 itself crashes. I have tried a few different things, including using the terrible "End" keyword.
I have had to resort to making a 'Loader' form that loads the AppBar. When I now close the appbar, VB does not crash, and I can close the loader form.
I have only encountered this in one other control a Tab app that I no longer use. I do remember though that there was a debug mode I could use that would resolve this; or am I barking up the wrong tree.
Anyone else encounter such a problem?
Re: [RESOLVED] Program Crashing
UPDATE:
Hi Guys;
Si : There was indeed the DetatchCallback in the system. It was in the Form_Unload event. I played around a bit, and by moving it to the Command button calling the end program on the form the application does now end with out crashing the VB Application.
I threw in a 'DoEvents' for good measure between the AppBar.Detatch and the Unload Form call and everything is running nice and smooth.
Thank you all for your help.
peteleeb
Re: [RESOLVED] Program Crashing
That sounds like you have set up the unloading process incorrectly - Form_Unload should be the perfect place for it, as that will work whichever way you can close the form (and should have no additional errors to having it elsewhere).
It sounds to me as if the code in your command button is not apt - it should be something along the lines of: Unload Me
For more info, see the article How should I close my form/program/class? from our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)
Of course if you want to post the code, we can check it for you.