Hi. Everyone. first of All sorry for my bad English. hope I can explain to what I want to do.
Advanced Thanks...
I listed All Fonts into Listbox.
Then I try to Find with TextBox1_TextChanged
When TextBox Changed Result Focus Bottom of Listbox.
How Can I show found Result on top Row of ListBox ?
Code:Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim fonts As InstalledFontCollection = New InstalledFontCollection() Try For Each FNT As FontFamily In fonts.Families ListBox1.Items.Add(FNT.Name) Next FNT Catch End Try End SubCode:Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged If TextBox1.Text = "" Then ListBox1.SelectedIndex = 0 End If ListBox1.SelectedIndex = ListBox1.FindString(TextBox1.Text) End Sub
why not like this result at top row ?
![]()


Reply With Quote
