Register incomming Skype calls with ActiveS in C# .NET

Description of the problem – register incomming Skype calls

Skype allows you to register for incomming calls – you can decide if you wanna take the call or not. ActiveS is a wrapper that allows you to control Skype through an easy API.

Solution: register incomming Skype calls ( C# and .NET )

The solution for Visual Basic is similar.

try {
// initialize Skype / ActiveS
ConversionClass m_objConversion = new ConversionClass();
AccessClass m_objAccess = new AccessClass();
// register event handler that listens on status changes of calls
m_objAccess.CallStatusChanged += new _IAccessEvents_CallStatusChangedEventHandler(Skype_CallStatusChanged);
// connect to Skype
} catch (Exception e) {

// our event handler
void Skype_CallStatusChanged(SKYPEAPILib.Call call, SKYPEAPILib.SkypeCallProgress callProgress)
if (callProgress.Equals(SKYPEAPILib.SkypeCallProgress.prgRinging) && call.Type.Equals(SkypeCallType.ctypIncomingP2P))
// display message box to ask user
MessageBox.Show("Do you wanna take that call from " + call.PartnerDisplayName + "?",
"Incomming Skype-call from " + call.PartnerDisplayName,

// if user answered no, hang up call
call.Status = SKYPEAPILib.SkypeCallProgress.prgFinished;
call.Status = SKYPEAPILib.SkypeCallProgress.prgInProgress;