Save/Load dialog doesn't show up and return DialogResult.Cancel

R

Richard Plante

Anybody gets problem with the save/load dialog that doesn't show up on
Compact Framework? I am using the standard dialog as shown in the following
example, but the dialog doesn't show up after running for a while in my
application, like it's memory related.

OpenFileDialog fileDialog = new OpenFileDialog();

/* setup dialog... */.

DialogResult dialogResult = fileDialog.ShowDialog();

Please note that I have other windows/dialogs in my application that shows
up properly, whereas the save/load has problems. Is the save/load dialog is
much consuming? Is that dialog is invoking native code underneath or if it's
pure managed code?

The result returned on the call to ShowDialog() is DialogResult.Cancel, no
matter the dialog was not displayed and the user didn't click the cancel
button. Thus, the cancel state is triggered by something else that is not
well documented in Microsoft's documentation.

I would like to figure out the reason of that DialogResult.Cancel state
returned by ShowDialog.

I am using Compact Framework 2.0 SP1 by the way.

....R
 
N

Nathan

Richard said:
Anybody gets problem with the save/load dialog that doesn't show up on
Compact Framework?

Yes. One of my customers is. I can't reproduce it on my own device.

Past threads indicate it may be
(1) the dialog may be launched on the wrong thread. Unlikely, since it
was created with the designer and launched from the main form.
(2). I didn't set InitialDirectory. I'll try setting it, but it is
ignored on the Pocket PC anyway, so I don't know if this will solve my
customer's problem.


Nathan
 
G

Guest

Hi Richard,

Know this is quite a while after your posting and hope you figured out by
now. I had the same problem where my save/load dialog box was not showing up.

What it ended up being was the FORM that I have the button (to invoke the
dialog box) and the Dialog Box attached to had the TOPMOST property set to
TRUE.

When I would change the TOPMOST property of the form to False, you could see
the open/save dialog box.

This is still a problem for me, since I don't want to expose all the forms
or the start button (since doing an embedded design for one application only)
and the TOPMOST attribute is the only way i know at this point.

Hope this helps a little
WillieJoe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top