هذا الكود يمنع البرنامج من التحميل من نفس المسار مرتين ثم يقوم بتنشيط البرنامج
الكود :
Function AnotherInstance() As Integer
Dim AppTitle$
If App.PrevInstance Then
AppTitle$ = App.Title
App.Title = "No longer want this app running..."
AppActivate AppTitle$
AnotherInstance = True
Else
AnotherInstance = False
End If
End Function
Sub Form_Load()
If AnotherInstance() Then End
End Sub
لتحميل السورس
اضغط هنـــــــــا
الكود :
Function AnotherInstance() As Integer
Dim AppTitle$
If App.PrevInstance Then
AppTitle$ = App.Title
App.Title = "No longer want this app running..."
AppActivate AppTitle$
AnotherInstance = True
Else
AnotherInstance = False
End If
End Function
Sub Form_Load()
If AnotherInstance() Then End
End Sub
لتحميل السورس
اضغط هنـــــــــا

0 التعليقات :
إرسال تعليق