I don't think KiX can do it natively but a KiXform might be able to, or Shawn might be able to add that as a feature.

WM_QUERYENDSESSION is what is sent to all applications, but no way for KiX to get that and let you know.

Here is an article for Shawn if it needs to go that way.

Making a Windows Forms app respond to System Shutdown
http://www.stevex.org/cs/blogs/dottext/articles/155.aspx