Hello
How to prevent second opened form from closing when user types in main form?User typing in first form will watch second form fields dynamically.
Thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Selva GanapathyPosted Nov 25, 2014, 12:14 AM
Hi llkin turk.
Hope you are trying to prevent closing until the user actually wish to close. for that you can handle the closing event
using the following code snippet.
void Form2_FormClosing(object sender, FormClosingEventArgs e)
{
if(!(form1 as Form1).checkBox1.Checked)
e.Cancel = true;
}
Regards,
Selva Ganapathy K
VulpesPosted Nov 24, 2014, 9:27 AM
But, if you handle its Resize event as follows, it should pop-up again if there's any attempt to minimize it:
Posted Nov 24, 2014, 9:06 AM
VulpesPosted Nov 24, 2014, 8:52 AM