Hello. I want to know the reason for closing the next window.
The fact is that CloseReason.UserClosing
is set to true
both when you close the cross, and when you click the Accept button. And I need to know whether the cross was pressed specifically. How can this be implemented?
Button processing code:
private void button1_Click(object sender, EventArgs e) { fileName = textBox1.Text; this.Close(); }