اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر (معدل)

تعقيباً على ما أشار إليه المهندس @Moosak ، ومن باب التوضيح ، فإن الترتيب المثالي ( من الناحية الفنية والأداء ) يجب أن يكون :-

  1. الثوابت ( Constants ) يجب أن تظهر بعد الإعلانات لأنها قد تعتمد على قيم من الإعلانات .
  2. الإعلانات ( Declares ) يجب أن تكون في البداية لأن الكود البرمجي يعتمد عليها .
  3. وضع الكود البرمجي في النهاية يجعل الكود أكثر تنظيماً وسهولة في القراءة .

فشكراً للفت الإنتباه لهذه النقطة :fff: ، وقد تم الانتهاء منها بإذن الله تعالى .

تم تعديل بواسطه Foksh
  • Thanks 1
  • 2 weeks later...
قام بنشر (معدل)

NewVer.png.f996820eb6d06902a4fc3826c8745bd8.png1.3.png.01fe62baa4e4c1153b52807bcdf709db.png

 

 

64.png.ed935d1c50d719737c9d83b5c0811df8.png   Pan.png.45f9842494a6aa7226fe95cd4691ae06.png 32.png.7629f9fbaca1030d9178855e280abd0c.png

Code Converter 64.zip    Pan.png.45f9842494a6aa7226fe95cd4691ae06.png   Code Converter 32.zip

 

 

طبعاً لإفاداتكم بالنتائج ، يسعدني إبداء الرأي لمن هو مهتم بوظيفة الأداة . مع العلم أن النسبة المرجو تحقيقها في الوقت الحالي 70%. وهي نسبة تعتبر بالنسبة لي جيدة نوعاً ما لما في الموضوع من تشعبات كثيرة وكبيرة جداً جداً ..

ولكن نسأل الله الوصول إلى أكبر نسبة من النجاح .

تم تعديل بواسطه Foksh
  • Like 1
قام بنشر

التجربة الأولى ناجحة ولله الحمد 🙂 

image.png.ffcad7554b594316d6c1b1229d16089b.png

بس لما رجعت أجرب نفس الكود السابق حصلت على نفس النتيجة السابقة 😅

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
  ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As _
  Long
Private Const KEYEVENTF_KEYUP = &H2


' Get the current state of the NumLock key

Function GetNumLockKey() As Boolean
  GetNumLockKey = GetKeyState(vbKeyNumlock)
End Function


Sub SetNumLockKey(ByVal newState As Boolean)
  ' if the current state must be changed
  If CBool(GetKeyState(vbKeyNumlock)) <> newState Then
    ' programmatically press and release the NumLock key
    keybd_event vbKeyNumlock, 0, 0, 0
    keybd_event vbKeyNumlock, 0, KEYEVENTF_KEYUP, 0
  End If
End Sub

والنتيجة

'===================================================
' API Code Converter for Dual Compatibility (32-bit & 64-bit)
' Developed By Foksh (Officena.Net)
' Generated on: 2025-06-10 17:43:10
' Tool version:  v1.3
'===================================================

Private Const KEYEVENTF_KEYUP = &H2

' Get the current state of the NumLock key

Function GetNumLockKey() As Boolean
  GetNumLockKey = GetKeyState(vbKeyNumlock)
End Function

Sub SetNumLockKey(ByVal newState As Boolean)
  ' if the current state must be changed
  If CBool(GetKeyState(vbKeyNumlock)) <> newState Then
    ' programmatically press and release the NumLock key
    keybd_event vbKeyNumlock, 0, 0, 0
    keybd_event vbKeyNumlock, 0, KEYEVENTF_KEYUP, 0
  End If
End Sub

#If VBA7 Then
    ' 64-bit declarations
    Private Declare PtrSafe Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
  ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As LongPtr)
    Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As _
  Long

#Else
    ' 32-bit declarations
    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
  ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As _
  Long

#End If

الترتيب غير صحيح .. المفروض :
الثوابت ثم -----> دالة ال API ثم ----->  الدالة الفرعية

قام بنشر
20 ساعات مضت, Moosak said:

الترتيب غير صحيح .. المفروض :
الثوابت ثم -----> دالة ال API ثم ----->  الدالة الفرعية

مهندسنا الغالي ،،

جاري المتابعة والتدقيق 😇

شكراً لمتابعتك بالإفادة الغير منقطعة :wub:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information