- Download Installer from here
Introduction
I am a .NET developer. I always chat with my partner. I think it is a waste of time to switch windows to Skype chat dialog. I created Skype integrated with Visual Studio 2005 and 2008, that allows you to chat in your Studio. It might help you save time when you need to chat and code at the same time.
This tool will help you save your time, not needing to switch in order to chat. You can wait for someone to reply on Skype chat and code at the same time. This package allows you to select your code in Visual Studio and send it to your co-worker, you can select error stack trace and send it to someone to help you. If you want more features, please let me know.
Features
- Chat with anyone in your contact list in Visual Studio
- Select part of code in Visual Studio and send
- Show received message in Visual Studio


Background
First, you need to know about Visual Studio Extensibility and Skype API. Visual Studio allows you to add any component on it, your component should be able to connect to the Studio. You also get any information in Visual Studio that contains your component.
With the Skype API, you can do chatting and make conference calls. Skype API is a COM component, Skype that provides for Windows Form. The API allows other applications able to send/receive message, make conference and there are many events that notify Skype's behavior. You can track anything that Skype does by using the API.
Using the Code
Pre-requisites
- Visual Studio SDK
- Skype client(Version 3.5 or later)
- Skype API, download from https://developer.skype.com
Create Visual Studio Packages for Skype
After you install Visual Studio SDK, there are many project templates, one of them is Visual Studio Integration Package located under Other Project Types > Extensibility on the New Project dialog box. Let's create a Skype project, Visual Studio Integration Package Wizard will show up.
- Select language, I prefer C# and say Generate a new key for this package.
- Put package information, company name, package name, version, minimum Visual Studio version and detail.
- Select package option, choose Tool Window
- Tool Windows information, Windows name is name of your window that will show in menu of Visual Studio and change "
cmdidMyTool
" to "cmdidSkypeTool
"

You will get a solution that Visual Studio generates for you. Press F5 for first checking, another Visual Studio instance will show up, this is Visual Studio for development environment, load difference registry with normal Studio, that Studio instance for testing our package. If everything is ok, you will see a new menu item on View>Other window>Skype.
Now, we are ready to work on connecting to Skype via Skype API.
1. Modify Skype>MyControl.cs

2. Load Contract List
#region Constructor
public SkypeStudioControl()
{
InitializeComponent();
skype = new SkypeClass();
if (!skype.Client.IsRunning)
{
skype.Client.Start(true, true);
System.Threading.Thread.Sleep(300);
}
this.skype.Attach(8, false);
this.skype.MessageStatus += this.SkypeMessageStatusChanged;
}
#endregion
3. Send text to selected user in contact list
private void btnSend_Click(object sender, EventArgs e)
{
if (axSkypeContactList1.Selection != null && axSkypeContactList1.Selection.Count > 0)
{
foreach (User var in axSkypeContactList1.Selection)
{
skype.SendMessage(var.Handle, this.txtSendText.Text);
}
}
this.txtSendText.Text = string.Empty;
}
4. Message incoming
void SkypeMessageStatusChanged(ChatMessage message, TChatMessageStatus status)
{
if (status == TChatMessageStatus.cmsReceived)
{
this.TextBox1.Text = string.Format("{0} : {1}",
string.IsNullOrEmpty(message.Sender.FullName) ?
message.Sender.Handle
: message.Sender.FullName, message.Body);
Debug.WriteLine(string.Format("Add ChatMessage {0},
TChatMessageStatus {1}",
message.Body, status.ToString()));
}
}
Points of Interest
- That will save you time when you need to chat.
- Visual Studio Extensibility
- Skype API
History
This is the first version. If you want me to improve this program, please let me know.