gelani قام بنشر أكتوبر 18, 2005 قام بنشر أكتوبر 18, 2005 صممت برنامج وأرغب في حمايته وقد قمت بحذف جميع الاختيارات من قائمة بدء التشغيل ولكن عند الضغط على الشفت يتم تعطيل هذه الأوامر وقد لاحظت في أكثر من مثال من هذا الموقع عدم فاعلية هذه الطريقة (أقصد الضغط على الشفت أثناء التشغيل) وبالتالي عدم القدرة على التعديل نظرأ لاختغاء اشرطة الأدوات. ارجو الافادة عن طريقة تعطيل الشفت أثناء التشغيل وبالتالي عدم ظهور بعض القوائم المخفية وكيف الدخول للبرنامج اذا رغبت التعديل وهل من طرق أخرى لحماية التصميم من العبث أو التعديل . وفقكم الله جميعاً
التقني قام بنشر أكتوبر 19, 2005 قام بنشر أكتوبر 19, 2005 السلام عليكم ورحمة الله أخي gelani جرب هذه الطريقة التالية : 1- ضع الكود أدناه في وحدة نمطية جديدة : Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer On Error GoTo Err_SetProperties 'Dim db As Database, prp As Property Dim db As DAO.Database, prp As DAO.Property Set db = CurrentDb db.Properties(strPropName) = varPropValue SetProperties = True Set db = Nothing Exit_SetProperties: Exit Function Err_SetProperties: If Err = 3270 Then 'Property not found Set prp = db.CreateProperty(strPropName, varPropType, varPropValue) db.Properties.Append prp Resume Next Else SetProperties = False MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description Resume Exit_SetProperties End If End Function 2- ضع الكود أدناه في حدث عند النقر للزر واسمه (bDisableBypassKey) .. Private Sub bDisableBypassKey_Click() On Error GoTo Err_bDisableBypassKey_Click Dim strInput As String Dim strMsg As String Beep strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & "Please key the programmer's password to enable the Bypass Key." strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password") If strInput = "TypeYourPasswordHere" Then SetProperties "AllowBypassKey", dbBoolean, True Beep MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & "The Shift key will allow the users to bypass the startup options the next time the database is opened.", vbInformation, "Set Startup Properties" Else Beep SetProperties "AllowBypassKey", dbBoolean, False MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & "The Bypass Key was disabled." & vbCrLf & vbLf & "The Shift key will NOT allow the users to bypass the startup options the next time the database is opened.", vbCritical, "Invalid Password" Exit Sub End If Exit_bDisableBypassKey_Click: Exit Sub Err_bDisableBypassKey_Click: MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description Resume Exit_bDisableBypassKey_Click End Sub ملاحظات: 1- ربما تحتاج الى المرجع التالي: DAO 3.6 2- هذا الكود منقول بالكامل من موقع أجنبي لذا لم أجربه على أي برنامج وبالتوفيق
التقني قام بنشر أكتوبر 19, 2005 قام بنشر أكتوبر 19, 2005 أخي العزيز اذا لم تنفع الطريقه أعلاه توجه الى هذا الرابط : http://www.officena.net/ib/index.php?act=S...st=0#entry42666
gelani قام بنشر أكتوبر 19, 2005 الكاتب قام بنشر أكتوبر 19, 2005 وفقك الله سأحاول وأطلعكم على النتائج إن شاء الله . دعائي لك ولجميع الأعضاء بالتوفيق
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.