Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / June 2007

Tip: Looking for answers? Try searching our database.

Model Dialog box causes another application to get focus

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GraffixNYC@gmail.com - 11 Jun 2007 17:18 GMT
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
Peter Bromberg [C# MVP] - 11 Jun 2007 17:43 GMT
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/newsgroups/default.aspx?dg=microsoft.public.dotnet.fra
mework.aspnet&lang=en&cr=US


Peter

Signature

Site:  http://www.eggheadcafe.com
UnBlog:  http://petesbloggerama.blogspot.com
Short urls & more:    http://ittyurl.net

> 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
Nicholas Paldino [.NET/C# MVP] - 11 Jun 2007 17:49 GMT
How is it an ASP.NET newsgroup question?  Windows Forms apps can have
modal dialog boxes...

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Sounds like an ASP.NET newsgroup question to me, not C# language.
> Try here if you want to use the MS web interface:
[quoted text clipped - 9 lines]
>> our application and not "activate" another window and make that window
>> have the focus
Peter Bromberg [C# MVP] - 11 Jun 2007 19:15 GMT
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
Signature

Site:  http://www.eggheadcafe.com
UnBlog:  http://petesbloggerama.blogspot.com
Short urls & more:    http://ittyurl.net

>     How is it an ASP.NET newsgroup question?  Windows Forms apps can have
> modal dialog boxes...
[quoted text clipped - 12 lines]
> >> our application and not "activate" another window and make that window
> >> have the focus
Peter Duniho - 11 Jun 2007 18:58 GMT
> 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
Aneesh Pulukkul[MCSD.Net] - 11 Jun 2007 19:17 GMT
On Jun 11, 10:58 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> > 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
[quoted text clipped - 17 lines]
>
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.