2
Contributors
3
Replies
14
Views
4 Years
Discussion Span
Last Post by Jx_Man
1

I already build a program with vb6. The problem is when the program is running and user click the exe file again then it makes program running twice in same time.
Is there a way to restrict this happened?

Something like this should working :

Private Sub Form_Load()
    If App.PrevInstance = True Then
        MsgBox "Application is running!", vbExclamation, "Warning"
        End
    End If
End Sub
Votes + Comments
Very simple code but worked great!!
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.