Public Declare PtrSafe Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongLong Public Declare PtrSafe Function ClientToScreen Lib "user32"
Public Declare PtrSafe Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongLong Public Declare PtrSafe Function ClientToScreen Lib "user32" (ByVal hWnd As LongLong, lpPoint As POINTAPI) As LongLong Public Popup_Menu As...
Private Declare PtrSafe Function canBusOff Lib "CANLIB32.DLL" (ByVal handle As LongPtr) As Long Private Declare PtrSafe Function canSetBusParams Lib "CANLIB32.DLL" (ByVal handle As LongPtr, ByVal freq As Long, ByVal tseg1 As Long, ByVal tseg2 As Long, ByVal sjw As Long, ByVal ...
Public Switch As Boolean ' 标识是否继续执行定时器代码 Private Declare PtrSafe Function SetTimer Lib "user32" ( _ByVal hWnd As LongPtr, ByVal nIDEvent As LongPtr, _ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPtr Private Declare PtrSafe Function KillTimer Lib "user32" ( _...
Private Declare PtrSafe Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, _ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPrivate Declare PtrSafe Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long#ElsePrivate ...
Private Declare PtrSafe Function FindWindowLib "user32" Alias "FindWindowA" (ByVal lpClassName AsString, ByVal lpWindowName As String) As LongPtr Private Declare PtrSafe FunctionGetWindowLong Lib "user32" Alias "GetWindowLongA" (ByValhwnd As L...
Private Declare PtrSafe Function GetTickCount Lib "kernel32" () As Long #Else Private Declare Function GetTickCount Lib "kernel32" () As Long #End If Public Sub Sleep(numa As Double) '延时方法 Dim num1 As Double Dim num2 As Double
#If VBA7 Then Private Declare PtrSafe Function getFrequency Lib "kernel32" Alias _ "QueryPerformanceFrequency" (cyFrequency As Currency) As Long Private Declare PtrSafe Function getTickCount Lib "kernel32" Alias _ "QueryPerformanceCounter" (cyTickCount As Currency) As Long #ElsePrivateDeclareFunctionget...
#If VBA7Then 'VBA7代表64位office,在64位office上声明函数,需要用到“PtrSafe”Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias 。。。#ElsePrivate Declare Function ShellExecute Lib"shell32.dll" Alias 。。。#End If这样,系统会自动判断是32位EXCEL,还是64位EXCEL,来执行不同的函数...
Private Declare PtrSafe Function getFrequency Lib "kernel32" Alias _ "QueryPerformanceFrequency" (cyFrequency As Currency) As Long Private Declare PtrSafe Function getTickCount Lib "kernel32" Alias _ "QueryPerformanceCounter" (cyTickCount As Currency) As Long ...