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. Visual Basic
  4. Prevent App from be launched more than once

Prevent App from be launched more than once

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
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.
  • W Offline
    W Offline
    Werries
    wrote on last edited by
    #1

    Hi there, I know there must be a way from preventing an Application to be launched more than once, but how? Any help will be appreciated. I'm coding in VB.Net 2003. Thanks, Werries

    A programmer's life is good... or is it?? Ek dink nie so nie!

    R K B 3 Replies Last reply
    0
    • W Werries

      Hi there, I know there must be a way from preventing an Application to be launched more than once, but how? Any help will be appreciated. I'm coding in VB.Net 2003. Thanks, Werries

      A programmer's life is good... or is it?? Ek dink nie so nie!

      R Offline
      R Offline
      Rupesh Kumar Swami
      wrote on last edited by
      #2

      hi,this works in vb2005. hope also in VB2003 go to Properties of Project & click on application tab now click on checkBox related to "Make single instance application" hope this helps

      Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India)

      W 1 Reply Last reply
      0
      • R Rupesh Kumar Swami

        hi,this works in vb2005. hope also in VB2003 go to Properties of Project & click on application tab now click on checkBox related to "Make single instance application" hope this helps

        Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India)

        W Offline
        W Offline
        Werries
        wrote on last edited by
        #3

        Thanks for your reply, but unfortunately VB.NET 2003 and VB.NET 2005 differ from each another in that area. I did find a nice sample of code to validate an instance of an application at http://www.vbforums.com/showthread.php?t=398309 Have a nice day. Regards, Werries

        A programmer's life is good... or is it?? Ek dink nie so nie!

        1 Reply Last reply
        0
        • W Werries

          Hi there, I know there must be a way from preventing an Application to be launched more than once, but how? Any help will be appreciated. I'm coding in VB.Net 2003. Thanks, Werries

          A programmer's life is good... or is it?? Ek dink nie so nie!

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          I wrote an article on this: http://www.codeproject.com/dotnet/windowsappsingleinstance.asp[^] Hope that helps. Ben

          1 Reply Last reply
          0
          • W Werries

            Hi there, I know there must be a way from preventing an Application to be launched more than once, but how? Any help will be appreciated. I'm coding in VB.Net 2003. Thanks, Werries

            A programmer's life is good... or is it?? Ek dink nie so nie!

            B Offline
            B Offline
            Bogdan Apostol
            wrote on last edited by
            #5

            Did you try creating a mutex? As far as I know, that is the general solution to such problem, and can be used in any language, since is supported by the OS through APIs. If CreateMutex() returns ERROR_ALREADY_EXISTS means there's an already running instance of your application. Regards,

            Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

            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