Results 1 to 3 of 3

Thread: [RESOLVED] Prevent second instance of application

  1. #1

    Thread Starter
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Resolved [RESOLVED] Prevent second instance of application

    Hi all,

    I have an application built in C# on .Net Compact Framework 2.0. I want to prevent my app to run in a second instance. Basically I need to prevent any other instance of the app to load, like what was used to be done in vb6 with App.PrevInstance. I've found that Mutex or even loop through the process list could seems that this is not possible on .Net CF. Can anyone please help.
    Thanks
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Prevent second instance of application

    HI,
    if this is PocketPC, then it is managed for you and only 1 instance will run. If it is Windows CE then you need to take a look at createmutex.

    Pete

  3. #3

    Thread Starter
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Re: Prevent second instance of application

    Thanks for the tip. I finally ended using CreateMutex and yes its on Win CE.
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

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