ش | ی | د | س | چ | پ | ج |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
برای 32 بیت :
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim a As POINTAPI
از رویداد OnTimer استفاده میشود تا در هر لحظه تغییر مختصات ماوس در Screen گرفته شود.
GetCursorPos a
Label1.Caption="X:" & a.x & ";Y:" & a.y
When running in 64-bit versions of Office, Declare statements must include the PtrSafe keyword. The PtrSafe keyword asserts that a Declare statement is safe to run in 64-bit development environments. Adding the PtrSafe keyword to a Declare statement only signifies that the Declare statement explicitly targets 64-bits.
وقتی در نسخه 64 بیت اجرا می شود.عبارات اظهارشده می بایست شامل کلیدواژه ی PtrSafe باشد.در عبارات زیر مشاهده می کنید که PtrSafe در کجا بکاربرده شده و در ضمن بجای تایپ داده Long از LongLong یا LongPtr استفاده شود.
[ Public | Private ] Declare PtrSafe Function name Lib "libname" [ Alias "aliasname" ] [ ( [ arglist ] ) ] [ As type ]