Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to show a form from windows service?

How to show a form from windows service?

Scheduled Pinned Locked Moved C#
tutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tridip Bhattacharjee
    wrote on last edited by
    #1

    can anyone explain me that how to show a form from windows service. i search google but found no solution. please explain anyone. Thanks in advance

    tbhattacharjee

    V L T 3 Replies Last reply
    0
    • T Tridip Bhattacharjee

      can anyone explain me that how to show a form from windows service. i search google but found no solution. please explain anyone. Thanks in advance

      tbhattacharjee

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      The Question is how do you Display a Form ?

      Form1 frm1 = new Form1();

      frm1.Show();

      i have not been doing win apps for a while now , but that is how its done. My point is that need to create that form first and show it later.

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      1 Reply Last reply
      0
      • T Tridip Bhattacharjee

        can anyone explain me that how to show a form from windows service. i search google but found no solution. please explain anyone. Thanks in advance

        tbhattacharjee

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Tridip Bhattacharjee wrote:

        How to show a form from windows service?

        Windows services don't interact with the user using UI.In fact they are "background" processes and it's not not safe to control the UI outside of the default drawing pool.If you need to control the service programatically define your own custom commands and send them to the service using ServiceController.ExecuteCommand method.See this sample.And if you need to report for some errors use the event log.

        Life is a stage and we are all actors!

        1 Reply Last reply
        0
        • T Tridip Bhattacharjee

          can anyone explain me that how to show a form from windows service. i search google but found no solution. please explain anyone. Thanks in advance

          tbhattacharjee

          T Offline
          T Offline
          Tamer Oz
          wrote on last edited by
          #4

          In service properties at Log On tab "Allow Service to interact with desktop" should be checked.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups