private void removeFromParent() { int i = User32.INSTANCE.GetWindowLong(getExternalHandle(), -16); i &= unchecked ((int)0xAFFFFFFF); User32.INSTANCE.SetWindowLong(getExternalHandle(), -16, i); WINAPI_test.INSTANCE.SetParent(getExternalHandle(), this.hwndOld); WinForms.unregisterForeignWindow(ThisHandle); }