Focus application


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Focus application

  1. #1
    Join Date
    Nov 2004
    Location
    Oslo
    Posts
    73

    Question Focus application

    Hi,

    I'm using a Mutex to check if my application is already running. So far I have presented a messagebox if the app is running:

    oRunning = New Threading.Mutex(True, GUID)
    If oRunning.WaitOne(0, True) Then
    'start app
    else
    MsgBox(mTitanIsAlreadyRunningText)
    EndIf


    But now I want it to receive focus. I have tried AppActivate, but it doesn't open the form if it is minimized. Shell() takes the AppWinStyle-parameter but can only be used to open a new instance. I have searched the Diagnostics-package but can't find anything.

    Any more ideas?
    oes

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Try this: http://www.devx.com/tips/Tip/20044

    If you don't like that solution, here are others:
    http://www.google.com/search?q=c%23+...vious+instance
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 0
    Last Post: 11-25-2002, 11:09 PM
  2. Replies: 0
    Last Post: 11-25-2002, 11:05 PM
  3. Inventory Management Application Using VB
    By Krishna in forum vb.announcements
    Replies: 0
    Last Post: 11-25-2002, 11:03 PM
  4. Switching focus between application
    By vu in forum VB Classic
    Replies: 0
    Last Post: 11-22-2001, 04:32 PM
  5. Switching Focus To Another Application
    By Kris Grindstaff in forum authorevents.appleman
    Replies: 1
    Last Post: 04-10-2000, 03:17 PM

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