Re: Service Generated Message Box Problem
- From: "Pete Delgado" <Peter.Delgado@xxxxxxxxx>
- Date: Fri, 3 Nov 2006 16:22:06 -0500
"Jay" <patelj27b@xxxxxxxxx> wrote in message
news:1162504067.786109.83440@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hey There,
I have a situation where if an error occurs in the service I'm
creating, I am generating a simple Message Box with an explanation of
the error. When I run an app that interacts with the service and a box
is generated it opens fine and works as I expected. If I then use the
"Switch User" functionality to switch to another user and have that
desktop open the application and generate the Message Box, for some
reason it displays the Message Box on the first user's desktop (which
is now not visible). So, since the service is waiting for the box to
have the "ok" button pressed, it appears (from the user's perspective)
that the service is "paused". What can I do to have the
service-generated MessageBox be displayed on the proper desktop?
There are various reasons why a service should *not* display a
user-interface. In pre-Windows Vista, a service could display a UI for the
user logged into the console (session0). This means that if you are using
Terminal Services or fast user switching (as you have found out) the UI will
be displayed on thesession 0 desktop even if another session has intitiated
the UI.
With windows Vista this option is no longer available as services by default
run under session0 which has now been designated as a non-interactive
session.
For error messages such as the one that you are generating, the appropriate
place to put them is in a custom event log or the application event log. If
you must display a user interface for the logged in user, a client-server
type application is the preferred method.
-Pete
.
- References:
- Service Generated Message Box Problem
- From: Jay
- Service Generated Message Box Problem
- Prev by Date: Re: Launching an application from other app on VISTA
- Next by Date: Re: CTreeCtrl EditLabel
- Previous by thread: Service Generated Message Box Problem
- Next by thread: Re: Service Generated Message Box Problem
- Index(es):