- تاريخ التسجيل
- 25 فبراير 2010
- المشاركات
- 6,596
- المجموعة
- ذكر
- الدفعة الدراسية
- 2009
- الكلية
- كلية تقنية المعلومات
- التخصص
- Information Systems
هذي سواه الدكتور في السكشن بس كنت غايب
اذا اليوزر يكتب شي في تيكست بوكس و يكون اوريدي موجود نفس الخيار في اللسته يسوي focus عليه
عندي الكود بس ماعرف شلون اسوي التكست بوكس
HTML:Private Sub ItemTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ItemTextBox.TextChanged Dim itemIndex As Integer = 0 Dim itemFound As Boolean = False Dim listCompare, textCompare As String Do While Not itemFound Or itemIndex < ItemsListBox.Items.Count listCompare = ItemsListBox.Items(itemIndex).ToString textCompare = ItemTextBox.Text If listCompare.StartsWith(textCompare.ToString) Then ItemsListBox.SelectedIndex = itemIndex itemFound = True Exit Do Else itemIndex += 1 End If Loop End Sub
أها ، عادي .. تسوي do until
وتعرف Found = false , index =0 قبلهم
وتخليه يجيك ليما يصير found = true or index =.items.count
ويجيك داخل هل الـ text = .text ؟
if yes , found = true to stop the loop
exit do
بعدين شلون تعرف ؟ if found = true
messagebox.show(" ") وتكتب المسج اللي تبيه
اذا مو موجودة ، تسوي .items.add(.text) 0
مادري اذا هذا قصدك او لا
وتعرف Found = false , index =0 قبلهم
وتخليه يجيك ليما يصير found = true or index =.items.count
ويجيك داخل هل الـ text = .text ؟
if yes , found = true to stop the loop
exit do
بعدين شلون تعرف ؟ if found = true
messagebox.show(" ") وتكتب المسج اللي تبيه
اذا مو موجودة ، تسوي .items.add(.text) 0
مادري اذا هذا قصدك او لا


:$
