>I have a form with a List box in it, when the listbox is double-clicked, it releases the form passing back a value.
>
>Is there a way of telling when the user has clicked the X in the corner of the form to close it, when it is clicked it still passess back the value?
>
You can use the Form's ReleaseType property. It's in the docs for the Form class.