code:
ChatWnd.SendMessage("/close");
That'll only work if the typing area is active, think of doing this when you've blocked that contact...
code:
Interop.Call('user32', 'SendMessageW', ChatWnd.Handle, 0x0010/*WM_CLOSE*/, 0, 0);
That's the best thing you can do.
[OFFTOPIC] @Matty: place your [s][/s] tags in your code block. [/OFFTOPIC]