I'm not an expert on .Net so I'm just asking if it's correct to declare the last argument to SendMessage as ByVal lParam As Object. It expects a pointer to the HITTESTINFO structure does it get that when it's declared as ByVal? If you're only using SendMessage for this purpose maybe you should try to change the declaration to ByRef lParam As HÍTTESTINFO. I don't know if that makes any difference since I'm unsure about the API declarations in .Net.