Jump to content
io.kent

[Simple and easy] The application is allready running [SRC]

Recommended Posts

Posted

On upside in your project put this code means after public class Form1.

Sub CheckIfAlreadyRunning()
If Not Process.GetProcessesByName(Process.GetCurrentProce ss.ProcessName).Length > 1 Then Exit Sub
MsgBox("The application is allready running", MsgBoxStyle.Critical, "System")
End
End Sub

And now just in forum load put this

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CheckIfAlreadyRunning()
End sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...