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. SHUTDOWN

SHUTDOWN

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelp
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.
  • T Offline
    T Offline
    tatchung
    wrote on last edited by
    #1

    Hello friends! I'm in the process of conceptualizing a test program that (hopefully) shuts down my unit for a given time but the catch is I want the program to close all running applications first particularly my internet connection (since i'm using dial-up connection) and shuts down my unit properly. Is this do-able in c# and if so could someone please give me a boost on this. I'm fairly new to programming let alone c# and i'm trying to scroll through the namespaces and i can't seem to get a solution for my problem. So any assistance regarding this matter would mean gold to me. Thanx for all your helps! Oh yeah I'm using Windows XP home ed and VS.NET 2003. Almost forgot..:-O Kampai!!!

    B 1 Reply Last reply
    0
    • T tatchung

      Hello friends! I'm in the process of conceptualizing a test program that (hopefully) shuts down my unit for a given time but the catch is I want the program to close all running applications first particularly my internet connection (since i'm using dial-up connection) and shuts down my unit properly. Is this do-able in c# and if so could someone please give me a boost on this. I'm fairly new to programming let alone c# and i'm trying to scroll through the namespaces and i can't seem to get a solution for my problem. So any assistance regarding this matter would mean gold to me. Thanx for all your helps! Oh yeah I'm using Windows XP home ed and VS.NET 2003. Almost forgot..:-O Kampai!!!

      B Offline
      B Offline
      Barm
      wrote on last edited by
      #2

      you can try using kill() to kill the processes you can try searching msdn for "C# kill process"

      T 1 Reply Last reply
      0
      • B Barm

        you can try using kill() to kill the processes you can try searching msdn for "C# kill process"

        T Offline
        T Offline
        tatchung
        wrote on last edited by
        #3

        Hey thanx! I found a similar program that shuts down a machine for a give time but the problem is it forces applications to terminate meaning it doesn't close applications properly. Any lead on this? How can i access my tool bar using c#? Thanx! Kampai!!!

        B 1 Reply Last reply
        0
        • T tatchung

          Hey thanx! I found a similar program that shuts down a machine for a give time but the problem is it forces applications to terminate meaning it doesn't close applications properly. Any lead on this? How can i access my tool bar using c#? Thanx! Kampai!!!

          B Offline
          B Offline
          Barm
          wrote on last edited by
          #4

          maybe you can use myProcess.CloseMainWindow(); but this only works with application with user interface. It behaves the same as selectign close from the application interface. There will be a user prompt for any unsaved data. but for applications without user interface, you will need to use myProcess.Kill() hope this helps

          T 1 Reply Last reply
          0
          • B Barm

            maybe you can use myProcess.CloseMainWindow(); but this only works with application with user interface. It behaves the same as selectign close from the application interface. There will be a user prompt for any unsaved data. but for applications without user interface, you will need to use myProcess.Kill() hope this helps

            T Offline
            T Offline
            tatchung
            wrote on last edited by
            #5

            Indeed! Thanx for the assistace it was such a big help! I gues i've no choice but to force terminate every application and hopefully doesn't ruin my machine:-D. Thanx again frend! Kampai!!!

            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