Results 1 to 2 of 2

Thread: Detect Multiple instances of one app running in different Mode

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Location
    England
    Posts
    64

    Detect Multiple instances of one app running in different Mode

    Morning all,

    I have an application and does a number of things i.e. runs in different modes. The mode is specified at command line level i.e. flag on the .exe shortcut.

    Thing is only one instance of the app must run for each mode. Is there any way I can make the app detect another instance of the app running with the same mode?

    In Task Manager the multiple instances of the app are listed with the same name.

    Thanks in advance for any solutions :-)

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Detect Multiple instances of one app running in different Mode

    You would have to implement your own functionality to have the new instance communicate with the existing instance(s) to determine whether it should continue or not. The single-instance functionality that forms part of the VB application framework is implemented using Remoting over TCP. You can implement your own single-instance functionality over TCP, IPC or whatever adn add your own behaviour. I believe kleinma did this recently to get around a firewall issue with Remoting over TCP so you might PM him.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width