Sub Button1_Click
Dim Contacts2 As Contacts2
Dim list1 As List
list1 = Contacts2.GetAll(False,False)
Dim listOfNames As List
listOfNames.Initialize
For i = 0 To list1.Size - 1
Dim c As Contact
c = list1.Get(i)
If c.DisplayName.IndexOf("@") = -1 Then
listOfNames.Add(c.DisplayName)
End If
Next
Dim res As Int
res = InputList(listOfNames, "Choose contact", -1)
If res <> DialogResponse.CANCEL Then
Dim name As String
name = listOfNames.Get(Res)
Dim c As Contact
For i = 0 To list1.Size
c = list1.Get(i)
If c.DisplayName = name Then Exit
Next
If c.PHONE_MOBILE > 0 Then 'c.PhoneNumber.Length >
edtNum.Text = c.PHONE_MOBILE
Else
edtNum.Text = "No mobile number"
End If
End If
End Sub