Eso no funciona, porque he creado un proyectito nuevo muy simple para probar eso, y no me va. No furrula el value. A la hora de cambiar de elemento en el value, el value siempre es nothing. Podéis probarlo. Aquí dejo el código del proyectito mini de prueba
Código:
Public Class FormPrueba
Private Sub FormPrueba_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
Dim Valor As Integer = 3
For i = 0 To 5
Dim Ele As New Elemento(Valor.ToString(), "Elemento" + i.ToString())
ComboBox1.Items.Add(Ele)
Valor = Valor + 1
Next
ComboBox1.DisplayMember = "DarTexto"
ComboBox1.ValueMember = "DarValor"
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
MsgBox(ComboBox1.SelectedValue)
End Sub
End Class
Public Class Elemento
Private T As String
Private V As String
Sub New(ByVal sV As String, ByVal sT As String)
T = sT
V = sV
End Sub
Public Property DarTexto() As String
Get
Return T
End Get
Set(ByVal Value As String)
T = Value
End Set
End Property
Public Property DarValor() As String
Get
Return V
End Get
Set(ByVal Value As String)
V = Value
End Set
End Property
End Class