如何通过Skype API发送图像



我正在使用Skype4ComLib库尝试将图像发送到Skype上的联系人。

Private Sub Button17_Click(sender As Object, e As EventArgs) Handles btnImageLoad.Click
    OpenFileDialog1.ShowDialog()
    PicBox.ImageLocation = OpenFileDialog1.FileName.ToString
End Sub

这将打开一个对话框,供用户选择图像并将其加载到名为PicBox的图片框中。

Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
    TimerImage.Stop()
End Sub
Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button16.Click
    TimerImage.Stop()
End Sub

按钮15和16启动定时器。

我想从定时器内发送图像,但我不能使用skype。Sendmessage,因为它只接受字符串。

任何想法?

使用SendKeys.Send方法,您可以通过实际的Skype应用程序将剪贴板中的图片粘贴到消息中。

我是这样做的:

My.Computer.Clipboard.SetImage(PicBox.Image)
SkypeClient.Client.OpenMessageDialog("<contact to send to>")
SkypeClient.Client.Focus()
SendKeys.Send("^(V){ENTER}")

<contact to send to>替换为要发送图片的联系人的姓名

最新更新