Results 1 to 5 of 5

Thread: (Resolved) Problem with single instance application

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    (Resolved) Problem with single instance application

    I have a application set as a single instance and have set the event handler like this:
    vb Code:
    1. Namespace My
    2.     Partial Friend Class MyApplication
    3.         Private Sub MyApplication_StartupNextInstance( _
    4.             ByVal sender As Object, _
    5.             ByVal e As Microsoft.VisualBasic.ApplicationServices. _
    6.             StartupNextInstanceEventArgs) Handles Me.StartupNextInstance
    7.  
    8.             MessageBox.Show("Application is already open", _
    9.                 "Error Opening Form", MessageBoxButtons.OK)
    10.             e.BringToForeground = True
    11.  
    12.         End Sub
    13.     End Class
    14. End Namespace
    Everything seems to work ok as long is my applications isn't hidden (I hide the app to an icon in the system tray). When it is hidden the application is brought to the foreground but it doesn't show up on the screen and only shows as an application in the toolbar. Clicking on it doesn't do any thing to show it either. Is there something else I need to do to make this work correctly?
    Last edited by FastEddie; Aug 21st, 2007 at 10:59 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
  •  



Click Here to Expand Forum to Full Width