12-12-12, 11:01 PM
الصفحات : 1 2
13-12-12, 12:01 AM
ايه الخطاء فى الكود ده
كود :
For Each ctr5 In Controls.OfType(Of System.Windows.Forms.TextBox)()
If Strings.Right(ctr5.Text.Split, 1) = ("s") Then
ListBox1.Items.Add(ctr5)
End If
Next13-12-12, 02:50 AM
هو ده الحل
كود :
Dim ctl5 As Control
Dim a As String
Dim b As Integer
For Each ctl5 In Me.Controls
If TypeOf ctl5 Is TextBox Then
a = Convert.ToString(ctl5.Name)
b = Len(a)
If (Mid(a, b, 1)) = "s" Then
ctl5.Text = ""
ListBox1.Items.Add(ctl5.Name)
End If
End If
Next13-12-12, 01:21 PM
أخي الكريم
تفضل هذا هو الكود
تفضل هذا هو الكود
كود :
For Each Ctl1 In Me.Controls.OfType(Of TextBox)()
If Ctl1.Name.EndsWith("s") Then
ListBox1.Items.Add(Ctl1.Name)
End If
Nextالصفحات : 1 2