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 / Windows Forms / WinForm General / January 2008

Tip: Looking for answers? Try searching our database.

Enable one Active window at a time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arora.dipti@gmail.com - 22 Jan 2008 06:25 GMT
Hi
We are working on a Health Contact Center Application in which a
patient is able to contact using either Chat Application or Phone Call
with the Doctors.
When the doctor is contacted using either of these means, a popup
appears at the Doctor's End and he is able to communicate with the
patient. When a doctor is busy handling the Phone Call ( a windows
form), he should not be able to work with the Chat Request(less
Priority) but when he is working with the Chat Application,he can work
on the phone Call(high Priority).
So we want to have some mechanism in which if these two popups(Phone
and Chat Window) are open at the sametime,doctor should be able to
work on Phone Call only and Focus Should not Go to Chat Window.

Please help
l33t - 22 Jan 2008 08:50 GMT
hello,
You can either use a JavaScript or c# to do this
JavaScript
if (!phonewindow.closed && phonewindow.location) ----> this will check if
the window is open and still in use
{
       chatwindow.blur() -----------> chat window will loose focus
}

C# ----->

You can use C# by using window.enable property as "pseudo code" below
shows ---

if(phonewindow.active) ---. shows if a window is active
{
chatwindow.enable = false;    //disables chat window so user can't use it
}

I hope this helps
regards
l33t

> Hi
> We are working on a Health Contact Center Application in which a
[quoted text clipped - 11 lines]
>
> Please help
Leon Mayne - 22 Jan 2008 15:07 GMT
> Hi
> We are working on a Health Contact Center Application in which a
[quoted text clipped - 11 lines]
>
> Please help

(Accidentally emailed first time round!)

I presume this is a winforms application and not an ASP.NET app?

You could do it the simple way or the hard way! The simple way might not be
fully to your needs though.

Simple way: Just open the Phone form using .ShowDialog() and open the chat
form using .Show().

Hard way: If you only want to restrict viewing the phone form when the chat
form is open then you will need to hook into the chat form's GotFocus event,
and then scan to see if the user has an instance of the phone form open. If
they do, send the focus to the phone form (thereby disallowing them to
change the focus to the chat form).

---
Leon Mayne
http://leon.mvps.org/

Rate this thread:







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.