Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: illegal closedown


Message #1 by "Bill" <william.crawley@u...> on Thu, 17 Oct 2002 11:55:27
Hi, Bill.

This might not be the same as your case, but, it might shed some light.

I had a form with the Infragistics SSCommand control.  This control has a
property that when set to True, pressing the ESC key would be like clicking
on the button.  I've set the button to unload the form and on the
Form_Unload event, I set the form to nothing.

I application perform an illegal operation if I press ESC to exit the form.
But, if I click on the button it is ok.

After much hair pulling, I commented out the line that sets the form to
nothing in the Form_Unload event and the problem disappeared.

There is something about that SSCommand control functionality.  So, for that
particular form, I set it to nothing from the calling BAS module.

Regards,
Rommel




-----Original Message-----
From: Bill [mailto:william.crawley@u...]
Sent: Thursday, October 17, 2002 3:36 PM
To: professional vb
Subject: [pro_vb] Re: illegal closedown


> Hiya Bill,

> Are you using any database or API calls which have not been properly
u> nloaded in your app?

The only api I use is set windowpos.

In all form unload events Iset each object refernced in a form to nothing.
In my controling form (this is not an MDI app) I call a routine in a bas
module that cyles the forms collection and unloads each form, then sets it
to nothing.

Regards
Bill

---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059



  Return to Index