Here it is
public DialogResult ShowDialog(IWin32Window owner
{ IntPtr ptr1
IntPtr ptr2
IntPtr ptr3
Form form1
object[] array1
if (owner == this
array1 = new object[1]
array1[0] = "showDialog"
throw new ArgumentException(SR.GetString("OwnsSelfOrOwner", array1), "owner")
if (base.Visible
array1 = new object[1]
array1[0] = "showDialog"
throw new InvalidOperationException(SR.GetString("ShowDialogOnVisible", array1))
if (!base.Enabled
array1 = new object[1]
array1[0] = "showDialog"
throw new InvalidOperationException(SR.GetString("ShowDialogOnDisabled", array1))
if (!this.TopLevel
array1 = new object[1]
array1[0] = "showDialog"
throw new InvalidOperationException(SR.GetString("ShowDialogOnNonTopLevel", array1))
if (this.Modal
array1 = new object[1]
array1[0] = "showDialog"
throw new InvalidOperationException(SR.GetString("ShowDialogOnModal", array1))
if (!SystemInformation.UserInteractive
throw new InvalidOperationException(SR.GetString("CantShowModalOnNonInteractive"))
if ((owner != null) && (((UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, owner.Handle), -20) & 8) == 0) && ((owner as Control) != null))
owner = ((Control) owner).TopLevelControl
this.calledOnLoad = false
this.calledMakeVisible = false
ptr1 = UnsafeNativeMethods.GetCapture()
if (ptr1 != IntPtr.Zero
UnsafeNativeMethods.SendMessage(new HandleRef(null, ptr1), 31, IntPtr.Zero, IntPtr.Zero)
SafeNativeMethods.ReleaseCapture()
ptr2 = UnsafeNativeMethods.GetActiveWindow()
ptr3 = ((owner == null) ? ptr2 : owner.Handle)
base.Properties.SetObject(Form.PropDialogOwner, owner)
form1 = this.OwnerInternal
if (((owner as Form) != null) && (owner != form1)
this.Owner = ((Form) owner)
tr
base.SetState(32, 1)
this.dialogResult = 0
base.CreateControl()
if ((ptr3 != IntPtr.Zero) && (ptr3 != base.Handle)
if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, ptr3), -8) == base.Handle
array1 = new object[1]
array1[0] = "showDialog"
throw new ArgumentException(SR.GetString("OwnsSelfOrOwner", array1), "owner")
UnsafeNativeMethods.GetWindowLong(new HandleRef(this, base.Handle), -8)
UnsafeNativeMethods.SetWindowLong(new HandleRef(this, base.Handle), -8, new HandleRef(owner, ptr3))
tr
base.Visible = true
if (this.dialogResult == 0
Application.RunDialog(this)
goto L_02EE
finall
if (!UnsafeNativeMethods.IsWindow(new HandleRef(null, ptr2))
ptr2 = ptr3
if (UnsafeNativeMethods.IsWindow(new HandleRef(null, ptr2)) && SafeNativeMethods.IsWindowVisible(new HandleRef(null, ptr2))
UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, ptr2))
base.SetVisibleCore(0)
if (base.IsHandleCreated
IntSecurity.ManipulateWndProcAndHandles.Assert()
tr
base.DestroyHandle()
finall
CodeAccessPermission.RevertAssert()
base.SetState(32, 0)
finall
this.Owner = form1
base.Properties.SetObject(Form.PropDialogOwner, null)
L_02EE
return this.DialogResult;
}