วิธีเปิด Skype ใน Visual Basic 2010
หากติดตั้ง Skype แล้วให้เปิดและไม่ได้ทำการดาวน์โหลด
Private Sub skype_Click(sender As System.Object, e As System.EventArgs) Handles skype.Click
Dim rk As RegistryKey = Registry.ClassesRoot.OpenSubKey("skype\shell\open\command", False) '"skype\shell\open\command"
Dim ReturnedValue As String = ""
Try
ReturnedValue = CStr(rk.GetValue(""))
Dim ReturnedValueSplit() As String = ReturnedValue.Split(CChar(ChrW(34)))
ReturnedValue = ReturnedValueSplit(1)
ReturnedValue = ReturnedValue.Replace(CChar(ChrW(34)), "")
If My.Computer.FileSystem.FileExists(ReturnedValue) = True Then
System.Diagnostics.Process.Start(ReturnedValue)("C:\Program Files (x86)\Skype\Phone\Skype.exe")
Else
System.Diagnostics.Process.Start("http://www.skype.com/en/download-skype/skype-for-windows/downloading")
End If
End Try
End Sub