If you are using VB.NET then you should be using IntPtr rather than Integer.

FindWindow API returns the handle of the window and handles are stroed in IntPtr datatypes unlike VB 6.