I’m trying to disable the close button on my robot application and add my own close button within the application itself. I want to do this so i am able to ask the operator with a gtpumessagebox if he/she really wants to close the application (because doing so results in the robot system going into a controlled shutdown state and subsequently shutting down).
The trouble i am having is not knowing how to disable the close button.
// remove close action and extra menu line
RemoveMenu(hmenu, cnt-1, MF_DISABLED | MF_BYPOSITION);
RemoveMenu(hmenu, cnt-2, MF_DISABLED | MF_BYPOSITION);
}
Don’t forget to add the refernce System.Windows.Forms.