This will work just fine:
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
{
MessageBox.Show("Sorry, you cannot close this form");
e.Cancel = true;
}
NOTE: this should not be the main form as user will not be able to end your application until the manually end the process. I dont see a reason why you dont want a form to be closed, you can confirm if the user really want to close the form or not before deciding whether to cancel the event arg's or not