Model Dialog box causes another application to get focus

G

GraffixNYC

We have a model dialog box(well a bunch of them) and it seems that
when you cancel one of the in our application it will activate and
bring the focus to another open window (not in our application) anyone
know why this is and how to correct it? it should set the focus to
our application and not "activate" another window and make that window
have the focus
 
N

Nicholas Paldino [.NET/C# MVP]

How is it an ASP.NET newsgroup question? Windows Forms apps can have
modal dialog boxes...
 
P

Peter Duniho

We have a model dialog box(well a bunch of them) and it seems that
when you cancel one of the in our application it will activate and
bring the focus to another open window (not in our application) anyone
know why this is and how to correct it? it should set the focus to
our application and not "activate" another window and make that window
have the focus

It's not entirely clear how your user is getting into the situation in
which the wrong window is activated when the dialog box is dismissed.
However, sometimes it's as simple as just making sure that the parent of
the dialog box is set correctly, by passing the reference to the form that
_should_ be the parent of the dialog box in the constructor when creating
the dialog box.

If that doesn't correct the problem, then you will probably have to come
up with a concise-but-complete code sample that reliably reproduces the
problem, along with instructions for how to get the problem to occur. The
behavior you're describing isn't normal absent any other interactions with
other applications by the user.

Pete
 
G

Guest

ModalDialog or in this case, "ModalDialogBox" is a Web term as opposed to the
windows forms "ShowDialog" method or the term Modal (or Modeless) form.
Hence the confusion. My apologies if Modal Form was meant.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




Nicholas Paldino said:
How is it an ASP.NET newsgroup question? Windows Forms apps can have
modal dialog boxes...


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Peter Bromberg said:
Sounds like an ASP.NET newsgroup question to me, not C# language.
Try here if you want to use the MS web interface:

http://msdn.microsoft.com/newsgroup....public.dotnet.framework.aspnet&lang=en&cr=US

Peter
 
A

Aneesh Pulukkul[MCSD.Net]

It's not entirely clear how your user is getting into the situation in
which the wrong window is activated when the dialog box is dismissed.
However, sometimes it's as simple as just making sure that the parent of
the dialog box is set correctly, by passing the reference to the form that
_should_ be the parent of the dialog box in the constructor when creating
the dialog box.

If that doesn't correct the problem, then you will probably have to come
up with a concise-but-complete code sample that reliably reproduces the
problem, along with instructions for how to get the problem to occur. The
behavior you're describing isn't normal absent any other interactions with
other applications by the user.

Pete

I'd faced this problem. Couldn't figure out a solution at that time.
It was using windows forms and custom dialog boxes. Seemed to be a
potential issue in windows forms modal dialogs.
 

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