How?

In C# it would be like this when you received a Message via the MessageStatus Event handler:
CODE
public static Skype skype = new Skype();
public static Chat chat = new Chat();
private string LastSent = "";
((_ISkypeEvents_Event)skype).MessageStatus += OurMessageStatus;
public void OurMessageStatus(ChatMessage chatmessage, TChatMessageStatus status)
{
if (LastSent == ichatmessage.Id.ToString())
{
return;
}
LastSent = ichatmessage.Id.ToString();
// Skype Chat Window for this Chat must be minmized
// or not in focus for this to work. If you looked
// for a status of TChatMessageStatus.cmsRead you
// could be sending replies to chat messages days,
// weeks, months old, that you just READ "looked at"
// now. You also want to make sure you only started
// this AFTER the Skype client started and got caught
// up with any chat message that may have been queued
// for it otherwise you would respond to many messages
// that were waiting for you since you logged off.
// A status of TChatMessageStatus.cmsReceived means
// the Skype client received and stored the message in
// the database.
// A status of TChatMessageStatus.cmsRead means that
// message has been read by you which could much later.
// If a Skype chat window is open and in focus when the
// message is received ONLY a status of cmsRead will be
// sent.
// LastSent is used to not process the same message
// twice. This only works if the last message was the
// same Id. The same message with a different status
// will still always have the same message Id.
// You can see the different message flows when the
// Skype chat window is maximized and in focus vs
// minimized using this program:
// http://forum.skype.com/index.php?showtopic=142871
if ((chatmessage.Type == TChatMessageType.cmeSaid) && (status == TChatMessageStatus.cmsReceived))
{
chat = skype.get_Chat(chatmessage.Chat.Name);
chat.SendMessage("Wow Really?");
}
}
You can see the different message flows in ANY Skype chat when the Skype chat window is maximized and in focus vs minimized using this program:
http://forum.skype.com/index.php?showtopic=142871