Looking for Visual Basic code that will allow me to send and receive instant messages over Skype?

I have VB 2005 Express Edition, and I am looking for Visual Basic code that will allow me to:

1. Monitor incoming messages from a specific contact in Skype

2. Retrieve those messages.

3. Be able to send messages.

m b2016-11-12T22:59:44Z

you will need to add a refrence to SKYPE4COMLib

if you want the full project just comment on here and il send it or ftp over or somthing (i never used SKYPE4COMLib before 10 mins ago and havent used vb for over 10 years so little rusty)

just to warn you skype will ask the users permission to access this via this method as in if its running in back ground when the user logs in will say request access by xxxx.exe to access skypeapi


then code is


Imports SKYPE4COMLib
Imports Enumerable = System.Linq.Enumerable

Public Class Form1
Dim SkypeApi As SKYPE4COMLib.Skype
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SkypeApi = New SKYPE4COMLib.Skype()
Dim personName As String = "Friendly name"
Dim chats As List(Of String) = New List(Of String)()


' all chat messages from that contact in linq
chats = Enumerable.ToList(Of String)((From chat As Chat In SkypeApi.Chats Where chat.FriendlyName = personName From message As ChatMessage In chat.Messages Select message.Body))

' all chat messages from that contact readable bit more readable
For Each chat As SKYPE4COMLib.Chat In SkypeApi.Chats
If chat.FriendlyName = personName Then
Dim messageCollection = chat.Messages

For Each message As SKYPE4COMLib.ChatMessage In messageCollection
chats.Add(message.Body)
Next
End If
Next

'send message
SkypeApi.SendMessage("username", "messageToSend")
End Sub
End Class