Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] [Simple and easy] The application is allready running [SRC]
#1
On upside in your project put this code
Code:
Sub CheckIfAlreadyRunning()
        If Not Process.GetProcessesByName(Process.GetCurrentProcess.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
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CheckIfAlreadyRunning()
End sub

Done!
[Image: 0b0033.gif]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [VB.NET] Animated Form Extend [SRC] Fragma 6 5,220 10-10-2013, 12:18 PM
Last Post: Saket
  [VB.Net][SRC] YouTube Bot HF~Legend 5 3,367 11-25-2012, 05:54 AM
Last Post: Ixam
  [VB.Net] Simple captcha class [Commented][Noob/Friendly] The-One 18 8,454 09-08-2012, 04:20 PM
Last Post: spesificrelax
  [VB.Net][SRC]ProgressBar Color HF~Legend 14 6,794 09-08-2012, 04:18 PM
Last Post: spesificrelax
  Application Organiser lhcrulz 3 2,410 02-11-2012, 08:56 PM
Last Post: AceInfinity

Forum Jump:


Users browsing this thread: 1 Guest(s)