Originally posted by SpunkyLoveMuff
It was working part of the time I think it works now as long as the CL is not minimized/closed
With using my example code: when the contactlist is closed there is no contactlist window to get the handle from and thus not a window to send the message to. So obviously that wont work; the contactlist needs to exist (it can be minimized though)....
Interop.Call('User32', 'PostMessageW', Messenger.ContactListWndHandle, WM_COMMAND, wParam, lParam);
If you don't want to depend on Plus! to get the handle of the contactlist window (thus by using the Messenger.ContactListWndHandle
property) you can also send the WM_COMMAND to the hidden Messenger window. But again, you of course need to get the handle to that window in order to send the message.
But beware if you use felipEx's example code. That wont work properly when you have more than one Windows Live Messenger running (polygamy).
for a short solution to get the handle to the MSNHiddenWindowClass window of the Windows Live Messenger client the code is running in.
If you don't do that, you might/will end up changing stuff in the other Messenger client (and thus in the other Messenger accounts)...