Losing Modal Form

From: David (David_at_discussions.microsoft.com)
Date: 12/22/04


Date: Wed, 22 Dec 2004 14:13:03 -0800

I am maintaining an application that was written as a client-server app for
Windows, using Delphi 3. In order to provide something giving the appearance
of thin-client functionality, we are testing the app with Terminal Services.
For the most part, it seems to work quite well, with minimal modifications.

There is one difficulty, though, that is driving us crazy...

Our application can be configured to automatically log off the user after a
defined period of time. This is usually a fairly short period--5 to 10
minutes. Once that happens, a modal login form is created, and sits on top of
the MDI main form until the user logs back in. This has never created any
problem in a standard Windows environment.

However, under Terminal Services, we see quite a strange thing happening.
The steps are as follows:

1) Open TermSvcs session, with our application automatically starting, based
on the user configuration

2) Minimize the TS session with our application active (so we can work on a
Word document locally, for instance)

3) Wait sufficient time for our application to log the user out

Under these conditions, when we alt-tab back to the TS session, we can
actually see our application in standard configuration, with the login form
sitting on top of the MDI main screen... this lasts for just a moment. Within
a second or so, the modal dialog login form slips back behind the MDI form,
for no reason we can discern.

It is possible to get the login form back by doing the standard alt-tab
within our TS session. However, our users tend to be quite technology
resistant, and they find it easier to declare our application unusable than
to remember to do one more alt-tab combination.

I have attempted a fix, forcing the modal login form to the top of the
zorder when the MDI form is activated. This seems to work, as long as the
client is running on Windows 2000 Professional, or Windows CE. But the fix
does not work for one user who is running Windows XP. I don't know if the
client platform is really the culprit, or not. But that is the appearance of
things.

Anyone have any ideas on how to write a really good fix for this problem?

Thanks!

David



Relevant Pages

  • Re: Problems logging on to Windows Based Server.
    ... This problem occurs because the Windows 2000-based server rejects your logon ... structure that is used to track the logon session. ... The client attempts to ... This problem does not occur in conjunction with Microsoft Windows NT-based ...
    (microsoft.public.security)
  • Re: RDP Crashing
    ... I sometimes cannot RDP into my Windows XP ... I leave the session locked but active. ... administrator (which kills the active session), logout, and login as myself. ... connect my W2k Client. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: tcp 139 or 445
    ... Windows can now support direct hosting of SMB over tcp port 445. ... client open a tcp/445 socket. ... Packet: Session Request ...
    (microsoft.public.windows.server.networking)
  • Re: Windows Service - Fast User Switching - Find Active Desktop Problem
    ... It needs to post advice windows on the desktop of whoever ... so that the active user can interact with it. ... > advice window it still appears on my session, ... simple by adding a UI client program in the Run key of HKLM or HKCU, ...
    (microsoft.public.platformsdk.security)
  • Re: Windows Service - Fast User Switching - Find Active Desktop Problem
    ... >> I am writing a Windows Service, which is allowed to interact with the ... > AFAIK services are always run in the console terminal session, ... > simple by adding a UI client program in the Run key of HKLM or HKCU, ...
    (microsoft.public.platformsdk.security)