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# / January 2008

Tip: Looking for answers? Try searching our database.

Modal Windows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aagarwal8@gmail.com - 17 Jan 2008 08:06 GMT
Hi,

I have a main form, which i use to open secondary forms. From the
secondary form i need to open a Modal Window in such a way that, my
secondary form is blocked, but i can still access my main forms, and
open other secondary windows.

(An exact analogy for my problem is the Yahoo Messenger, where i can
open any number of chatwindows from the main messenger window; and
from the chat windows i can invoke the File Trasnfer option, which
opens a modal disalog. But even when the File Transfer dialog is
opened, i can still go to the main messenger window and open other
conversation windows)

Any suggestions on how to achieve this?

Regards,
Ankit!!
Nicholas Paldino [.NET/C# MVP] - 17 Jan 2008 13:23 GMT
Ankit,

   The only way I can think of to do this would be to open the other
windows on other threads.  This means that you will have to run message
pumps on those threads.  Then, the calls to open a modal dialog should be
applicable for just the window on that thread.

   Of course, make sure when making calls between windows, that you are
using the Invoke method.  Since the windows are on other threads, all calls
you make to the UI in other threads needs to be marshaled to the correct UI
thread.

Signature

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

> Hi,
>
[quoted text clipped - 14 lines]
> Regards,
> Ankit!!
Bill McCarthy - 17 Jan 2008 13:44 GMT
One other possibility is to not show the dialog as modal, rather just show
it and set it's owner.  When the dialog shows, it set's the owner's Enabled
property to false, and on close it sets it back to true.

> Ankit,
>
[quoted text clipped - 26 lines]
>> Regards,
>> Ankit!!
christery@gmail.com - 26 Jan 2008 22:53 GMT
> >> Any suggestions on how to achieve this?

A search on MDI might help? threading is a bit complicated... win dont
like modal/always on top if there are more than one
//CY

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.