How do I set it so if the user clicks close, any input is ignored and the form is closed?
IMHO, this is the incorrect approach. There is a basic standard that's all about how Windows apps should be laid out and behave, and this approach doesn't fit. Mind you, I'm sure I'm guilty of not adhering to that standard 100% as it is quite involved. Anyway, my answer would be don't do what you are doing as Close has one meaning, and Cancel has another. In the simplest terms, your form should have a Save/Close button and a Cancel button and not be too close together. Should be fairly obvious as to what they do. You choose to permit the cancellation of the Cancel if a form is partially filled out or not by way of design. I would hate to lose a lot of work if I clicked the wrong one. Point is that you have to make the decision as to whether or not that's warranted or just a pesky prompt. Another choice is Save, Close, Cancel, and a prompt to force a conscious decision to not save before closing. However, the Save without closing is more complex, but it does allow you to save a partial record and pause (or leave and come back) as long as the minimum required fields are filled in.
Last edited by Micron; 04-26-2018 at 01:15 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.