-1
我想知道如何在聊天室中与其他人/朋友聊天时如何实现表情符号。在我的聊天室实现笑脸信息框
这是我要送我的消息了:(聊天客户端的形式)
private Image smiley = Image.FromFile(Application.StartupPath.ToString() + "\\Smiles\\ConfusedSmiley.png");
private void SendMsg_Click(object sender, EventArgs e)
{
if (WriteMsg.Text != "")
{
int _index;
_index = WriteMsg.Find(":S");
if (_index != -1)
{
WriteMsg.Select(_index, ":S".Length);
WriteMsg.InsertImage(smiley);
}
mConnection.SendMessage(".msg : " + WriteMsg.Text);
WriteMsg.Text = "";
}
}
这是我与流输出连接:
public void SendMessage(string Msg)
{
Console.WriteLine(">>"+Msg);
Outgoing.WriteLine(Msg);
Outgoing.Flush();
}
现在,你可以看到,在我的聊天表单的“SendMsg_Click”中,我输入了以下内容时应该发送的图像的类型:S,所有发送的都是空文本,没有图像。我目前正在使用Khendys.Controls“ExRichTextBox”来尝试获取图像的工作。现在,我的另一个问题是,我需要将相同的东西添加到服务器客户端吗?如果我只通过聊天客户端来完成,它可能必须在服务器客户端中,也就是我所说的。
谢谢,那是我以为我必须做的;我现在要试一试。 – user795232 2011-06-13 14:56:03
它像一个魅力,感谢,伙计! – user795232 2011-06-13 15:12:44