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 run windows application as a windows service.

How to run windows application as a windows service.

Scheduled Pinned Locked Moved C#
2 Posts 2 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.
  • J Offline
    J Offline
    Janu_M
    wrote on last edited by
    #1

    Hi I developed a Windows Application. Now I want to run it as a windows Service . Is there any facility or statements(code) to run the application as a service. Please tell me. Thanks in Advance. Ramu Medida

    C 1 Reply Last reply
    0
    • J Janu_M

      Hi I developed a Windows Application. Now I want to run it as a windows Service . Is there any facility or statements(code) to run the application as a service. Please tell me. Thanks in Advance. Ramu Medida

      C Offline
      C Offline
      coolestCoder
      wrote on last edited by
      #2

      Hi, Windows service dosent have a GUI. So if you want to run Windows application as windows service there are 2 ways of doing it ( atleast, i know this much only ) 1) Create a new windows service. copy all code from windows application to the newly create service (without any GUI related code, but satisfying the business logic). Install the service. Run it. 2) Just hide the windows application to a tray icon. In this way, you dont need to copy code. But then the application itself should be bbuilt in such a way that it dosent get stuck for user interaction for its process to continue, but when interrupted, should respond to the user. I dont know why you want to shift from windows application to windows service. if you could specify some details, then it would be easier to give some specific advice.


      "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


      coolestCoder

      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