Bon sa date un peut mais mieux vaux tard que jamais
Ton problème viens de la déclaration de GetWindowRect. Le paramètre lpRect doit être déclarer en byref et non en byval
VB6
Code Visual Basic :
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, ByRef lpRect As RECT) As Long
Private Structure RECT
Public Left As Long
Public Top As Long
Public Right As Long
Public Bottom As Long
End Structure
VB.NET
Code Visual Basic :
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Integer, ByRef lpRect As RECT) As Integer
Private Structure RECT
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
Amicalement
1000 recherches sur Google = 1Km de voiture en CO² (réfuté par Google
)
1000 recherches sur Forestle = 100 m² de forêt tropicale sauvé
.
Surfez écolo 