Many thanks SaswatPadhi. Tried the GetDesktopWindow function and that did the job.

Thanks again

Joe.