I have a application set as a single instance and have set the event handler like this:
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?vb Code:
Namespace My Partial Friend Class MyApplication Private Sub MyApplication_StartupNextInstance( _ ByVal sender As Object, _ ByVal e As Microsoft.VisualBasic.ApplicationServices. _ StartupNextInstanceEventArgs) Handles Me.StartupNextInstance MessageBox.Show("Application is already open", _ "Error Opening Form", MessageBoxButtons.OK) e.BringToForeground = True End Sub End Class End Namespace




Reply With Quote