don't know from that description, a black spirit could be a shadowman, or just a spirit trying to manifest. seeing a transparent one through your window is the same thing, probably a spirit. without a description or further information, we can't jump to a conclusion.
for instance, do you only see these things at night? it could be your eyes playing tricks with you, you see something in the distance and you make it into a familiar shape. the human mind does this all the time. same can be said with the transparent being in your window, could be a reflection.
when it's in the room, do you get a strange feeling. i don't mean you see something so you get freaked out, before you see it, you feel something watching you, or the room might change. the air gets warmer or colder, sometimes people can smell something, or hear a noise.
lets say, for argument, that it's a spirit. just talk to it. you might not be able to communicate with it though, some people who can see spirits can't speak with them and vise versa. if you can't speak with it, try using a pendulum, the spirit will move it in a yes, no, don't know, and don't want to answer.
keep a level head though, you need to clear your mind when doing this, and make sure your arms are comfortable and steady. we can move the pendulum ourselves with subconscious movements, so be careful. you should feel the spirit, and hear/sense the answer in your mind. it'll be different than you thinking of an answer.
you could try other things like voice recorders, i'd avoid Ouija Boards though. with whatever you try, get into a meditative state, clear your mind, and then ask the questions, in this state, i've found it easier to communicate.
if i were you though, i'd rule out all logical answers before jumping to spirits if all you've got going for your argument is a shadow on the wall and a face in the window at night. try getting a flashlight, when you see the shadow, shine the light in the area, see if you can find something that could be mistaken as the shadow.