Invalid window handle

Hi,

I am facing this error : (1400, ‘SetForegroundWindow’, ‘Invalid window handle.’)

Can anyone help with this!!!