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 control the number of instances of a application

How to control the number of instances of a application

Scheduled Pinned Locked Moved C#
tutorialquestion
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.
  • I Offline
    I Offline
    Ivan Fernandez
    wrote on last edited by
    #1

    I want to control the number of instances of my application and if this number is greater than a fixed number, give the focus to one of the opened instances. Any suggestion?? Iván Fernández

    K 1 Reply Last reply
    0
    • I Ivan Fernandez

      I want to control the number of instances of my application and if this number is greater than a fixed number, give the focus to one of the opened instances. Any suggestion?? Iván Fernández

      K Offline
      K Offline
      Kastro
      wrote on last edited by
      #2

      There is an article on Code Project by Detlef Grohs that describes the process for creating a single instance application in VB.NET. You could use the same technique with modifications to achieve what you want. It involves using Mutexes and .NET Remoting. The article is here: http://www.codeproject.com/vb/net/sing_inistan.asp[^] There is also a sample on MSDN called "Real World Applications" that describes a similar technique (using C#). It's located here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/reaworapps1.asp?_r=1[^]

      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