public void ShowConfigurationUI(IntPtr hwndOwner) { var owner = NativeWindow.FromHandle(hwndOwner); using (var dialog = new ConfigurationDialog(this)) { dialog.Owner = Control.FromHandle(hwndOwner) as Form; dialog.ShowDialog(owner); } }