Hello Cathi, thanks for the help. The code works just fine. I was wondering if you could explain a couple of things for me. What do the two constant variables do? I assume SC_CLOSE identifies that the close button was clicked. What does MyBase.WndProc(m) do? Also I knew you could override events, but I didn't know you could override an API event (if that is what is occurring). How did you find out that WndProc runs when a form is closed? And finally, how do you come up with all this stuff? Your amazing. You answer just about every question that is posted. I appreciate the time you take to help others. Thanks.
Randy Belcher
AFG Industries, Inc.