Click here to Skip to main content
16,016,557 members

Comments by Asha Love (Top 7 by date)

Asha Love 16-Jul-24 3:27am View    
Deleted
It really worked. Thank you. I have not encountered anything like this before. Although the true value was not given for e.Cancel, but by putting the code e.Cancel = false; At the end of the FormClosing form, the program was closed without any problems.
thanks guys
Asha Love 16-Jul-24 3:27am View    
It really worked. Thank you. I have not encountered anything like this before. Although the true value was not given for e.Cancel, but by putting the code e.Cancel = false; At the end of the FormClosing form, the program was closed without any problems.
thanks guys
Asha Love 16-Jul-24 2:42am View    
The form that contains the gridview is the child form.
Exactly when this happens, the parent form is not closed.
The source of all these problems is Gridview. When a cell is clicked and that cell is edited, the problem is solved.
Sorry if I can't explain better, my English is poor.
Asha Love 15-Jul-24 14:32pm View    
private void Frm_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
{
if (System.Windows.Forms.MessageBox.Show("Are you sure?", "", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.No)
{
e.Cancel = true;
return;
}
}

private void Frm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
{
System.Windows.Forms.MessageBox.Show("Test");
}
Asha Love 15-Jul-24 13:32pm View    
No error occurs. Form does not close when the X button is pressed.
But the X button works when a cell is clicked to enter edit mode