public void ShowDialog(IWin32Window owner) { DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { dlgOpen.ShowDialog(form); } catch (Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); }
public DialogResult ShowDialog(IWin32Window owner) { DialogResult returnDialogResult = DialogResult.Cancel; DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { returnDialogResult = dlgOpen.ShowDialog(form); } // Sometimes if you open a animated .gif on the preview and the Form is closed, .Net class throw an exception // Lets ignore this exception and keep closing the form. catch (Exception) {} form.Close(); return(returnDialogResult); }
public DialogResult ShowDialog(IWin32Window owner, string filename) { DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; DialogResult r = DialogResult.None; dlgOpen.FileName = filename; try { r = dlgOpen.ShowDialog(form); } catch (Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); return(r); }
public DialogResult ShowDialog(IWin32Window owner) { DialogResult res = DialogResult.None; DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { res = dlgSave.ShowDialog(form); } catch (Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); return(res); }
public DialogResult ShowDialog(IWin32Window owner, string filename) { DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; DialogResult r = DialogResult.None; dlgOpen.FileName = filename; try { r = dlgOpen.ShowDialog(form); } catch(Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); return r; }
public void ShowDialog(IWin32Window owner) { DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { dlgOpen.ShowDialog(form); } catch(Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); }
public DialogResult ShowDialog(IWin32Window owner) { DialogResult returnDialogResult = DialogResult.Cancel; DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { returnDialogResult = dlgOpen.ShowDialog(form); } // Sometimes if you open a animated .gif on the preview and the Form is closed, .Net class throw an exception // Lets ignore this exception and keep closing the form. catch(Exception){} form.Close(); return returnDialogResult; }
public DialogResult ShowDialog(IWin32Window owner) { DialogResult res = DialogResult.None; DummyForm form = new DummyForm(this); form.Show(owner); Win32.SetWindowPos(form.Handle, IntPtr.Zero, 0, 0, 0, 0, UFLAGSHIDE); form.WatchForActivate = true; try { res = dlgSave.ShowDialog(form); } catch(Exception ex) { MessageBox.Show(ex.Message); } form.Dispose(); form.Close(); return res; }