It is believed the gunman forced his way into the property on Downsfield Road in Sheldon before firing at the victim, aged 28, at around 10.30pm.
The gunman then fled the scene.
The victim was taken to hospital, where his condition was today described as critical but stable.
The investigation is at an early stage, but detectives have recovered CCTV from the area and are following up a number of lines of enquiry.
Extra patrols are being carried out in the area today to reassure residents.
Anyone with information has been asked to get in touch with police through the live chat service at www.west-midlands.police.uk, or via 101.
Alternatively, call Crimestoppers on 0800 555 111.