공통 이벤트의 WinForm

때때로 업데이트에 ...

로드 : 제기 할 때 폼이로드;

LocationChanged :

를 keyDown : 일반적으로 CTRL + S로 바로 가기 키를 사용, 저장

FormClosed : 폼 등의 구현을 닫은 후, 시작 폼 등의 형태를 방문 닫혀 후 "Application.Exist ()"를

FormClosing : 양식이 닫혀 수행하는, 그것은이 폐쇄되지 않은 "당신이 정말로 그것을 닫으시겠습니까?"

private void FrmMain_FormClosing(object sender, EventArgs e)
{
    if (
        MessageBox.Show(
            "你确定要退出吗?", 
            "提示", 
            MessageBoxButtons.YesNo, 
            MessageBoxIcon.Question
        ) == DialogResult.No)
    {
        e.Cancel = true;    // 阻止默认的“关闭”事件
    }
}

sizeChanged에 :

크기 조정 :

HTTPS : //www.cnblogs.com/rainman/p/3647729.html 재현

추천

출처blog.csdn.net/weixin_34416649/article/details/93561359