Thanks,

I now get the error "Method or data member not found"

ElseIf GetCapture() <> Picture1.hwnd

By the way im using an ImageBox not PictureBox if thats the problem.