showdialog

WPF Routed Commands and ShowDialog Windows

Hello, I was wondering how a window opened through ShowDialog is treated in the Visual Tree. For example, Window A opens Window B through a ShowDialog. When firing a routed command on Window B, Window A does not receieve the command (even though it is listening for it). Is there any way to make this work? Thanks! Jon ...

Is it possible to use ShowDialog without blocking all forms?

I hope I can explain this clearly enough. I have my main form (A) and it opens 1 child form (B) using form.Show() and a second child form (C) using form.Show(). Now I want child form B to open a form (D) using form.ShowDialog(). When I do this, it blocks form A and form C as well. Is there a way to open a modal dialog and only have it bl...

How to correctly ShowDialog() from inside an MDIChild form?

I have an MDIChild form that needs to show a dialog. I'm currently doing it like this from inside the mdichild form... f.ShowDialog(Me) Should I be using f.ShowDialog(mdiparent)? What is the difference when setting the owner before calling showdialog()? Thanks. ...

System::Windows::Forms::Form::ShowDialog()

I have a 2 forms setup my first form will call another form with the ShowDialog() method when I receive data from the serial port ShowDialog() throws InvalidOperation with additionnal information "DragDrop registration did not succeed" any hints on how to solve this? ...

ShowDialog, PropertyGrid and Timer problem

I have a strange bug, please, let me know if you have any clues about the reason. I have a Timer (System.Windows.Forms.Timer) on my main form, which fires some updates, which also eventually update the main form UI. Then I have an editor, which is opened from the main form using the ShowDialog() method. On this editor I have a PropertyG...

VB.NET: What is the best way to retrieve a value from a second form?

I'm teaching myself VB.Net. Here is a problem I have recently come across. Say I have a main Form1 in my application. Form1 calls a second LoginForm which (like the name suggests) is a login window with username/password type fields. Expected behaviour is that LoginForm will capture login details and pass them back to Form1. What is th...

How to achieve modal dialogs from NotifyIcon context menu?

I've got a shell tray icon with an attached context menu. The problem I'm having is that calling ShowDialog() from a context menu Clicked handler does not result in a modal dialog. It's easy to reproduce this with a default C# project. Simply add the following code to the Form1.cs file: protected override void OnLoad(EventArgs e) { ...

How to Link Different Form ?

I got great help in my first question n hopefully someone will tell me or refer me to an earlier question about this topic. I want to link different forms like I click on a button on first one and it opens the second one.Basically Im going to make a Menu for cellphone fucntions like SMS,CALL etc so I want that If I click on call a new f...

Can I set ShowDialog() to not be topmost?

Is there a way I can set a ShowDialog() to not be topmost? I've looked at all the related SO questions, and none quite matched my situation. What I do is open a new WinForm from a datagridview button column. This new form pulls information from a few SQLite tables and allows the user to add information to the row the button was clicked....

When would ShowDialog() return null?

WPF's Window.ShowDialog method returns a nullable boolean. So does CommonDialog.ShowDialog. Now, I understand cases where these would return false (user clicked Cancel or pressed Esc), and when they would return true (code sets Window.DialogResult to true, probably in response to OK being clicked). But null? My first thought is that cl...

WPF ShowDialog returns null immediatly on second call ...

I think this is a bug in the WPF framework, with out going into depths of my program and why I am doing what I am doing, I wrote a simple test app to prove my theory. Can someone confirm this issue, and suggest possible work arounds for a series of dialogs to be executed before putting the app into its run loop? using System; using Sys...

WPF ShowDialog and ElementHost

Hello, is it possible to display a Modal Window from a WPF User Control, that is a child of an ElementHost, and set the owner/parent of the Modal Window to the containing Form control? I'm guessing you can't do this, as the Owner property takes an instance of Window, where as I want to set it to the parent of the Element Host control, w...

How to show another window from mainwindow in QT

Platform: QT, Windows XP I am new to Qt. I want to show another window(what to do to open it as dialog) from mainwindow. I did "add New Item ->Qt Designer Form Class", named it say MyWindow. But how to show this MyWindow from mainwindow ? ...

ShowDialog() while another form is visible through ShowDialog() as well, closes both?

I have the following situation: ParentForm which opens WelcomeForm with ShowDialog. WelcomeForm contains a Button which opens NewProjectForm with ShowDialog When the user hits OK on NewProjectForm, a new project is created and both forms are closed (good behaviour) When the user hits CANCEL on NewProjectForm, both forms are closed (und...

Passing setting value back to form that had called the form

This is what I have.. Dim frmSettings As New frmOptions frmSettings.ShowDialog(Me) frmSettings is a settings form that you can choose the color for background of form1(Me). But I cannot access the form1 properties to change the backcolor. ...

WPF: Should I manually call Close on windows opened by ShowDialog method?

The thing is that WPF Window doesn't implement IDisposable interface which led me to believe, that I don't have to manually dispose of it when I open it by calling ShowDialog() but the first comment on this MSDN page states differently. Does anybody know what's the truth? ...

Save Dialog on top of another custom dialog is behaving strangely!

I have a save as image feature for charts in my application. The chart control is a custom user control with custom logic in them. It also has some scaling based on size, zoom etc. However, while saving them as an image I would like to give the user the option to set the size of the image (eg: 800x600 px @ 300 DPI). To do this I have cr...

WPF Dispatcher.UnhandledException within a ShowDialog call.

It appears that ShowDialog() invokes the Dispatcher message handling loop within. Thus, you have a stack that looks something like: Outer-most Dispatcher message loop ... x.ShowDialog() Inner Dispatcher message loop ... I am using the Dispatcher.UnhandledException to catch exceptions not handled by my code. However, it appears that ...

Compact Framework: Show Dialog and executing code AFTER the form shows

Working in .NET Compact Framework, C#, .Net 3.5, Visual Studio 2008. Targeting Windows Mobile and CE devices from the same project (it's a CE app, runs on both types of devices). I have a form that must be displayed using ShowDialog. the form itself is just a blank screen with a "loading..." message on it. AFTER the form displays on the...

How to check whether the form has any ShowDialog() forms open?

I have a form MainForm with several properties/methods that are accessed from another thread. At some point I might open a form AuxForm with ShowDialog() and then while that modal form is open, the other thread still modifies the MainForm's properties. This is all desired. In one of the methods accessed from another thread I need to ...