السلام عليكم
هذا الكود يمنع المستخدم من فتح البرنامج اكثر من مره
كود PHP:
Dim appProc() As Process
Dim strModName, strProcName As String
strModName = Process.GetCurrentProcess.MainModule.ModuleName
strProcName = System.IO.Path.GetFileNameWithoutExtension(strModName)
appProc = Process.GetProcessesByName(strProcName)
If appProc.Length > 1 Then
MessageBox.Show("There is an instance of this application running.")
End IF