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. Multiple startup

Multiple startup

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

    Hi, I've build an application but it isn't suppose to startup more than once. How do I prevent my application to startup more than once?? Kevin

    P L 2 Replies Last reply
    0
    • K KBou

      Hi, I've build an application but it isn't suppose to startup more than once. How do I prevent my application to startup more than once?? Kevin

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Possibly the easiest way is to use a mutex. I posted a WPF version here[^], but it's easy enough to apply this to a Forms app.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      • K KBou

        Hi, I've build an application but it isn't suppose to startup more than once. How do I prevent my application to startup more than once?? Kevin

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        There are countless articles on CodeProject providing solutions to your problem.

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 alpha 4a out now (29 May 2008)

        L 1 Reply Last reply
        0
        • L leppie

          There are countless articles on CodeProject providing solutions to your problem.

          xacc.ide - now with TabsToSpaces support
          IronScheme - 1.0 alpha 4a out now (29 May 2008)

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Hi, actually none of those "solutions" do what the OP asks. At best they make the second instance die rapidly, but they don't prevent it from starting up. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          Voting for dummies? No thanks. X|


          L 1 Reply Last reply
          0
          • L Luc Pattyn

            Hi, actually none of those "solutions" do what the OP asks. At best they make the second instance die rapidly, but they don't prevent it from starting up. :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            Voting for dummies? No thanks. X|


            L Offline
            L Offline
            leppie
            wrote on last edited by
            #5

            From what I have seen, most are the same, and I use the same thing in my applications too: 1. Create Mutex. 2. Check Mutex, then use IPC (with Remoting) to talk and do what you need with either instance.

            xacc.ide - now with TabsToSpaces support
            IronScheme - 1.0 alpha 4a out now (29 May 2008)

            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