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 / .NET Framework / Distributed Applications / November 2003

Tip: Looking for answers? Try searching our database.

UIP - Modal forms in MDI app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Dunleavy - 05 Nov 2003 11:30 GMT
I have an MDI application using the block.

I've called starttask() passing the MDI parent form and
I've marked one of my forms to show modal in the config
file. The block falls over with the error -

"Forms that are not top level forms cannot be displayed as
a modal dialog. Remove the form from any parent form
before calling showDialog."

upon inspecting the code it will try to set the forms' MDI
parent then call showdialog() passing the parent form. Is
this a bug?. SDI apps work fine.
Wojtek Suwala - 13 Nov 2003 13:51 GMT
> I have an MDI application using the block.
>
[quoted text clipped - 9 lines]
> parent then call showdialog() passing the parent form. Is
> this a bug?. SDI apps work fine.

In my opinion there is a bug in WinFormViewManager class method
ActivateView.

I think that you should try to find the follwoing lines

Form parentForm = (Form)GetProperty( taskId, ParentFormKey );
               if( parentForm != null && parentForm.IsMdiContainer ==
true)
                   winFormView.MdiParent = parentForm;

and replace them with

Form parentForm = (Form)GetProperty( taskId, ParentFormKey );
               if( parentForm != null && parentForm.IsMdiContainer ==
true && !viewSettings.IsOpenModal)
                   winFormView.MdiParent = parentForm;

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.