Olá, muito obrigado pela indicação, no meu sistema 32 bits funcionou corretamente.
porém eu estou com uma dúvida. Como faço para rodar em 64 bits esse código abaixo?
código do link.
Declare Function FindWindow32 Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
Declare Function GetWindowLong32 Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
Declare Function SetWindowLong32 Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer, _
ByVal dwNewLong As Long) As Long
Global Const GWL_STYLE = (-16)
Global Const WS_SYSMENU = &H80000
eu preciso que esse código rode tanto em 32 quanto 64bits. eu estou mencionando isso, pois no código acima existe uma citação ao "user32", no caso eu tenho que acrescentar user64?
ficaria assim?
código para rodar em 32 e 64.
Declare Function FindWindow32 Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
Declare Function GetWindowLong32 Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
Declare Function SetWindowLong32 Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer, _
ByVal dwNewLong As Long) As Long
Declare Function FindWindow64 Lib "user64" Alias "FindWindowA" _
(ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
Declare Function GetWindowLong64 Lib "user64" Alias "GetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
Declare Function SetWindowLong64 Lib "user64" Alias "SetWindowLongA" _
(ByVal hWnd As Integer, ByVal nIndex As Integer, _
ByVal dwNewLong As Long) As Long
Muito obrigado
Postado : 06/04/2018 6:31 am