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. App prevents windows to shutdown

App prevents windows to shutdown

Scheduled Pinned Locked Moved C#
csharphelpquestion
5 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.
  • G Offline
    G Offline
    GermanDM
    wrote on last edited by
    #1

    Hi, Ive written a small app which runs in the system tray and runs calls from a web service on a timer much like a windows service. I'm using C# Express so i had to write this as a windows application. Everything is working great. Only problem is that users are not allowed to exit this application. Only way to kill the app is by killing the process in task manager. Anyway if the user tries to shutdown his PC it just doesn't shutdown until the process of the app has been killed. :confused: Anyone have a reason as why this is happening? Thanks :)

    X 1 Reply Last reply
    0
    • G GermanDM

      Hi, Ive written a small app which runs in the system tray and runs calls from a web service on a timer much like a windows service. I'm using C# Express so i had to write this as a windows application. Everything is working great. Only problem is that users are not allowed to exit this application. Only way to kill the app is by killing the process in task manager. Anyway if the user tries to shutdown his PC it just doesn't shutdown until the process of the app has been killed. :confused: Anyone have a reason as why this is happening? Thanks :)

      X Offline
      X Offline
      Xmen Real
      wrote on last edited by
      #2

      what method you are calling to close your application? try Application.Exit()

      TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can

      G 1 Reply Last reply
      0
      • X Xmen Real

        what method you are calling to close your application? try Application.Exit()

        TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can

        G Offline
        G Offline
        GermanDM
        wrote on last edited by
        #3

        Thanks for your response. The thing is im not calling anything to close the app as the app needs to run all the time unless the pc shuts down. So basically once the user shuts down the pc my app needs to somehow know that the pc is shutting down so it can exit itself. But another question is why doesn't windows kill the process because its trying to shutdown? Thanks

        X 1 Reply Last reply
        0
        • G GermanDM

          Thanks for your response. The thing is im not calling anything to close the app as the app needs to run all the time unless the pc shuts down. So basically once the user shuts down the pc my app needs to somehow know that the pc is shutting down so it can exit itself. But another question is why doesn't windows kill the process because its trying to shutdown? Thanks

          X Offline
          X Offline
          Xmen Real
          wrote on last edited by
          #4

          http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!2185/lngWid!10/anyname.htm[^] then this will help

          TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can

          G 1 Reply Last reply
          0
          • X Xmen Real

            http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!2185/lngWid!10/anyname.htm[^] then this will help

            TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can

            G Offline
            G Offline
            GermanDM
            wrote on last edited by
            #5

            Thanks alot this looks exactly what im looking for. Will put it to the test :)

            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