nycjeff
Sun Mar 18 2007, 02:35
Hello,
I'm new here. I searched but didn't find anything as far as I can tell.
I'm trying to start developing with vb express. and skype.
All the examples use wscript. Unfortunately I can't find how to reference this.
It seems like the object should be in with visual basic express already, but I don't seem to be able to access it.
Sorry for such a newb question, but any help is appreciated.
-jeff
nycjeff
Sun Mar 18 2007, 12:05
Its seeming like its all in Visual Basic Scripting (vbs) as opposed to Visual Basic 2005 Express. I suppose that's my problem, although I'm hoping not.
Zardos
Sun Mar 18 2007, 14:22
I too have been pulling my hair out trying to just get started with VB and Skype4COM. I finally found a small bit of VB code which jumpstarted me. I think I have it all figured out now. Here is a full VB 2005 program to get you going:
The Button1 will fill a multi-line textbox with all your contacts (you need to make a multi-line textbox called Textbox1, and a button called Button1)
The call handler will show you who is calling. To see all the available handlers, thats at the top in the pull-down.
Its pretty "easy" to figure out at this point, just use the auto-intell fills on the variables when you define a .Skype type, or any type, like IUser, etc..
Sure hope this helps!
PS -- you must ADD REFERENCE to the Skype4COM.DLL under the add reference menu under PROJECT. Also, you must have the DLL registered.. so from a CMD prompt, you can "regsvr32 Skype4COM.dll" in the directory where you placed the DLL
Zardos
------------------------
Public Class Form1
Private WithEvents objSkype As SKYPE4COMLib.Skype
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
' Connect to Skype
objSkype = New SKYPE4COMLib.Skype
objSkype.Attach()
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Information)
End Try
End Sub
' Event to handle calls
Private Sub objSkype_CallStatus(ByVal objCall As SKYPE4COMLib.Call, ByVal Status As SKYPE4COMLib.TCallStatus) Handles objSkype.CallStatus
' If a P2P caller is ringing
If objCall.Type = SKYPE4COMLib.TCallType.cltIncomingP2P And Status = SKYPE4COMLib.TCallStatus.clsRinging Then
' Add the caller to TextBox1
TextBox1.Text &= objCall.PartnerHandle & vbCrLf
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SFriend As SKYPE4COMLib.IUser
For Each SFriend In objSkype.Friends
TextBox1.Text += SFriend.FullName & vbCrLf
Next
End Sub
End Class
nycjeff
Sun Mar 18 2007, 15:45
Hi,
Thanks. It helps. I finally got some interaction to work which feels good.
-jeff
nycjeff
Mon Mar 19 2007, 19:19
QUOTE(nycjeff @ Sun Mar 18 2007, 02:35) [snapback]373250[/snapback]
All the examples use wscript. Unfortunately I can't find how to reference this.
It seems like the object should be in with visual basic express already, but I don't seem to be able to access it.
Sorry for such a newb question, but any help is appreciated.
-jeff
Finally found this link from Microsoft.
This helps me understand things better. I hope it helps someone else:
http://support.microsoft.com/kb/279164
Ben Loula
Fri Jun 15 2007, 17:01
I've been having this same problem. Thanks for the sample code, Zardos.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.