【发布时间】:2009-06-20 00:39:26
【问题描述】:
- 如何在我的 vb.net 应用程序中包含 Skype 库?
- 如何通过 vb,net 在 Skype 上拨打电话?
【问题讨论】:
【问题讨论】:
Skype 提供了一个可从 VB.NET 使用的 COM API。有关在 VB.NET 中使用 COM 的更多信息,请参阅:
http://msdn.microsoft.com/en-us/library/x66s8zcd.aspx
Skype API 文档位于:
https://developer.skype.com/Docs/ApiDoc
而且,虽然不在 VB.NET 中,但在 SEHE AKA Skype Event Handler Example 中有一个很好的例子来说明如何使用 Skype API。它是用 C# 编写的,但同样的原则适用于 VB.NET,只是语法略有不同。
【讨论】:
这是在 C# 中,但很容易转换为 VB using the Skype API
【讨论】:
这是使用 vb.net 在 Skype 上拨打电话的代码,包括声明。
Imports SKYPE4COMLib
Public class form 1
Public WithEvents skype As New SKYPE4COMLib.Skype
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'check if the skype client is running
If Not skype.Client.IsRunning Then
skype.Client.Start()
End If
end sub
'use a button or other control to place a call to the test account of skype
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
skype.PlaceCall("echo123")
End Sub
要打电话给其他人,只需替换 echo123,不要忘记“引号”
【讨论】: