• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

How can we disable the close button on the upper right corner of the form?

Hi. I'm developing an application that would need a form to be always visible to the user. My problem is that I can't seem to find a way to enable the minimize and maximize buttons, while disabling the close button on a form. How can I do this?
1 Solution
Call GetSystemMenu() to get a handle to the window's system menu, then delete it with a call to DeleteMenu():

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now