Как открыть 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