27-12-21, 08:46 PM
وعليكم السلام ورحمة الله وبركاته
تفضل :
تفضل :
كود :
Function AnotherInstance() As Integer
Dim AppTitle$
If App.PrevInstance Then
' Hold the title of the application (title bar caption)
AppTitle$ = App.Title
' Change our application title
App.Title = "No longer want this app running..."
' Activate the previous instance
AppActivate AppTitle$
' Let calling procedure know another instance was detected
AnotherInstance = True
Else
' Let calling procedure know another instance was NOT detected
AnotherInstance = False
End If
End Function
Sub Form_Load()
' Don't want two copies of the program running at the same time
If AnotherInstance() Then End
' Note: that this routine will not work if the application's title changes
' (showing file names in the title bar for example).
End Subقال صلى الله عليه وسلم:
«كلمتان خفيفتان على اللسان
ثقيلتان في الميزان،حبيبتان إلى الرحمن:
سبحان الله وبحمده، سبحان الله العظيم».
