The OpenFileDialog shows modally, and when OK or Cancel is clicked the
dialog closes and you can do whatever you want. If you see that the dialog
is still visible, then perhaps the screen has not yet had a chance to paint
itself. You could get around this with an Application.DoEvents() call right
after the ShowDialog function returns.
--
John Wood
EMail: first name, dot, second name at priorganize.com
"e-mid" <yy@ss.com> wrote in message
news:eb**************@TK2MSFTNGP11.phx.gbl...
when i open my new modal form after i get dialog.ok result, openFileDialog
window is open too. therefore i asked for openFileDialog closed event or
some other way to do.
"Christopher Kimbell" <a@b.c> wrote in message
news:40********@news.broadpark.no... I' not quire sure what you want to achieve.
Since the OpenFileDialog is modal, you can't get access to the selected
filename before the dialog has closed.
In the code posted by Shakir, replace the MessageBox code with some code
that launches your other form.
Before launching it, get whatever data you need from the OpenFileDialog
object.
Chris
"e-mid" <yy@ss.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... in fact, i want to open another modal dialog according to file chosen.
after i get dialogResult ; i keep filename. but i have to wait openfiledialog being closed to open a modal form.
there seems no way to that?
"e-mid" <yy@ss.com> wrote in message
news:ut*************@tk2msftngp13.phx.gbl...
> why does not openFileDialog have closed event?
>
> i want to do something; as soon as the dialog closes. is there a way
to do > this?
>
>