Click here to Skip to main content
15,846,144 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to disable cancel button in form and (minimize or maximize button is enable) how to do this?
Sergey Alexandrovich Kryukov 20-Nov-12 18:47pm    
You can disable any button. Why would you create a Cancel button if you want to disable it?!

1 solution

Do you mean the Close button? The "X" in the top right corner?

If so, then it's not obvious - you have to use CreateParams. Have a look here: Disable the Close box on a form[^]
Share this answer
Arsalaan Ahmed 20-Nov-12 10:40am    
yes "X" in the top right corner,,,,
Arsalaan Ahmed 20-Nov-12 10:44am    
any property to disable cancel button.
OriginalGriff 20-Nov-12 11:09am    
Follow the link - it shows you how to do it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900