Creating a single instance program


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Creating a single instance program

  1. #1
    Matt v2.0 Guest

    Creating a single instance program


    I have a program in written in VB6 and I am interested in not allowing multiple
    iterations to be running simultaneously (i.e. if the user clicks the icon
    to start the program a second time another version doesn't start). Is there
    any simple method for doing this?

  2. #2
    Veign Guest

    Re: Creating a single instance program

    Just check the App.PrevInstance when the app first starts, if True then end
    your application (NOT using the End statement)...

    --
    Veign
    www.veign.com
    NEW ActiveX Control - Jeweled Style Buttons
    www.veign.com/download_activex.html#jwldbutn
    Code Samples & Sample Projects
    http://www.veign.com/information/app.../info_app.html
    Submit Your Best Code (you keep the rights)
    http://www.veign.com/information/app...de_submit.html
    ---------
    "Matt v2.0" <vb.@127.0.0.1> wrote in message news:3d9b3255$1@10.1.10.29...
    >
    > I have a program in written in VB6 and I am interested in not allowing

    multiple
    > iterations to be running simultaneously (i.e. if the user clicks the icon
    > to start the program a second time another version doesn't start). Is

    there
    > any simple method for doing this?




  3. #3
    Matt v2.0 Guest

    Re: Creating a single instance program


    Wow, that is great, I am quite pleased that I didn't have to go to any great
    lengths to get this done! Thanks a million! Really.
    Matt

    "Veign" <NOSPAMinveign@veign.com> wrote:
    >Just check the App.PrevInstance when the app first starts, if True then

    end
    >your application (NOT using the End statement)...
    >
    >--
    >Veign
    >www.veign.com
    >NEW ActiveX Control - Jeweled Style Buttons
    >www.veign.com/download_activex.html#jwldbutn
    >Code Samples & Sample Projects
    >http://www.veign.com/information/app.../info_app.html
    >Submit Your Best Code (you keep the rights)
    >http://www.veign.com/information/app...de_submit.html
    >---------
    >"Matt v2.0" <vb.@127.0.0.1> wrote in message news:3d9b3255$1@10.1.10.29...
    >>
    >> I have a program in written in VB6 and I am interested in not allowing

    >multiple
    >> iterations to be running simultaneously (i.e. if the user clicks the icon
    >> to start the program a second time another version doesn't start). Is

    >there
    >> any simple method for doing this?

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center