Lỗi do mấy hàm API không tương thích với hệ thống 64 bit. Đã sửa lại, bạn mở file xem thế nào nhéNhờ anh chị xem và sửa lỗi giúp e file e download đc trên mạng nhưng tải về máy mở file ý ra bị báo lỗi như hình dưới ạ. Em cảm ơn ạ. View attachment 238527
Private Declare PtrSafe Function SetTimer Lib "user32" Alias "SetTimer" _
(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" Alias "KillTimer" _
(ByVal hwnd As LongPtr, ByVal nIDEvent As LongPtr) As Long
Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
Declare PtrSafe Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" _
(ByVal hwnd As LongPtr, ByVal nIndex As Long) As LongPtr
Private Declare PtrSafe Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" -
(ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr
Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr
Public Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr
Dạ, em cảm ơn anh ạLỗi do mấy hàm API không tương thích với hệ thống 64 bit. Đã sửa lại, bạn mở file xem thế nào nhé
------------------------------------------------------------------
Toàn bộ các hàm đã sửa:
Mã:Private Declare PtrSafe Function SetTimer Lib "user32" Alias "SetTimer" _ (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" Alias "KillTimer" _ (ByVal hwnd As LongPtr, ByVal nIDEvent As LongPtr) As Long Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr Declare PtrSafe Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" _ (ByVal hwnd As LongPtr, ByVal nIndex As Long) As LongPtr Private Declare PtrSafe Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" - (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr Public Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr
Gì anh nhỉ, e thấy đăng bên mục những vấn đề chung, mn ko hay đọc lắm nên chuyển sang mục này mà. E có xóa bài gì đâu ạMót với mẹt. Lỡ trả lời bài phạm quy rồi thấy người ta nhắc thì mắc cở xoá bài.
View attachment 238534