Windows Service and application.DoEvents()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wolfgang Kutschera

    Windows Service and application.DoEvents()

    Greeting folks!

    This question has been asked before, but unfortunately never really
    been answeared. I would appreciate to get any clous on how to solve
    the problem:

    I am writing a windows service that interacts with the desktop. (It
    shows a status dialog if a user is currently logged on.) To get this
    dialog shown correctly I need to have something like an
    application.doe vents() call in my service. Is there anything like that
    for use with such services?

    I would appreciate any help.
    Rick
  • Crouchie1998

    #2
    Re: Windows Service and application.DoE vents()

    If you're service is a background service then it should be ok. How often &
    for how long does the service interact with the Desktop?

    Crouchie1998
    BA (HONS) MCP MCSE


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Windows Service and application.DoE vents()

      "Wolfgang Kutschera" <rick@dangerous .it> schrieb:[color=blue]
      > This question has been asked before, but unfortunately never really
      > been answeared. I would appreciate to get any clous on how to solve
      > the problem:
      >
      > I am writing a windows service that interacts with the desktop. (It
      > shows a status dialog if a user is currently logged on.) To get this
      > dialog shown correctly I need to have something like an
      > application.doe vents() call in my service. Is there anything like that
      > for use with such services?[/color]

      You could separate the UI from the service and then let the UI application
      communicate with the service using events, remoting, sockets, ... This
      would avoid the problems introduced by services which interact with the
      desktop.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Wolfgang Kutschera

        #4
        Re: Windows Service and application.DoE vents()

        "Crouchie19 98" <crouchie1998@d iscussions.micr osoft.com> wrote in message news:<#t79JUQOF HA.624@TK2MSFTN GP10.phx.gbl>.. .[color=blue]
        > If you're service is a background service then it should be ok. How often &
        > for how long does the service interact with the Desktop?
        >
        > Crouchie1998
        > BA (HONS) MCP MCSE[/color]

        Hi!

        The service mainly does it's work within the first two minutes after
        it is being started. The interaction should take place during this
        period of time. Currently if a user is logged on the windows appears
        on the users screen, but never gets the time to handle the draw event.
        (Means the frame is visible, the content isn't...)

        Rick

        Comment

        Working...