The short answer is:
Form.Close()
,
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.close.aspx[
^].
The details of the question are not clear at all. A form, pathological cases aside, cannot be in a panel. Yes, you can stick it into a panel as a child control, but normally it would throw an exception, and I see no situations where it could be needed.
Besides, closing a form by this call is usually not what people typically do in a reasonable design. You should understand that you won't be able to open the same instance of the form again. Just to warn you…
I would advise that you ask questions providing more detail, starting with the purpose of the technique in question and the ultimate goals of your application.
—SA