Private Sub MyForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True End Sub>Thanks Cathi, that will work for my purposes, but I can't believe you can't control the X separately. Is there a place you can put code for when the X is hit?