sending message in a skype group conversation through vc#
How can I send the message in a group conversation of skype开发者_开发问答 chat through vc#.
Though I have included the skype reference in my application and can get some chats.
Thanks.
You need a reference to an IChat interface.
You can get such a reference using ISkype.Chat property.
Once you have the IChat reference it is just a matter of calling SendMessage() method.
If you like to you can take a look in a Skype plugin I wrote here. (You don't need to understand the whole application of course. Just take a look in Application class defined in Application.cs)
[Edited]
Some sample code
using System;
using System.Windows.Forms;
using SKYPE4COMLib;
namespace SkypeClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ISkype skype = new SkypeClass();
skype.Attach(5, true);
int count = skype.Chats.Count;
textBox1.Text = "Count: " + count + "\r\n";
foreach (IChat chat in skype.Chats)
{
textBox1.Text += "\r\n" + chat.FriendlyName;
}
}
}
}
Hope this helps.
精彩评论