showdialog

  • Thread starter Thread starter lukasz
  • Start date Start date
L

lukasz

I want to show a modal dialog box at a moment when I don't know which form
of my application is focused, so I can't call ShowDialog(owner). Keeping
current form in a global variable would be troublesome. Other ideas?
 
Hi Lukasz,

The best solution currently for you would be to maintain a global list
of openforms. And when you want to call Showdialog loop through the
forms checking which one has focus.

Quite cumbersome approach i know. But it seems we will have to wait till
VB.Net 2005 to use My.Appliaction.OpenForms, until then i guess we will
have to roll our own.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 
* "lukasz said:
I want to show a modal dialog box at a moment when I don't know which form
of my application is focused, so I can't call ShowDialog(owner). Keeping
current form in a global variable would be troublesome. Other ideas?

Simply don't pass an owner to the 'ShowDialog' method...
 
hah.. I wasn't aware of the parameterless version of the method. According
to the specs it's what I wanted -- thanks.
 
Back
Top