User Tools

Site Tools

blog:2020-04-24_c_hide_form_instead_of_closing_form



2020-04-24 c#: Hide form instead of closing form

  • When user click the “X” button on a form.
  • We did not want destroy it but just hide the form.

Solution

  •         private void TestForm_FormClosing(object sender, FormClosingEventArgs e)
            {
                e.Cancel = true; // 取消
                Hide(); // 隱藏此 TestForm
            }

TAGS

  • 169 person(s) visited this page until now.

Permalink blog/2020-04-24_c_hide_form_instead_of_closing_form.txt · Last modified: 2020/04/24 15:35 by jethro

oeffentlich