Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

exit form esc winforms

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == (Keys.Escape))
            {
                Close();
                return true;
            }

            return base.ProcessCmdKey(ref msg, keyData);
        }
 
PREVIOUS NEXT
Tagged: #exit #form #esc #winforms
ADD COMMENT
Topic
Name
2+1 =