How to over come "not responding" problem in e-dictionary with 7000 pairs of word & meaning.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am working on a dictionary project for word meaning search which is written in VB10.net . it contain around 8,000 pairs of word and meaning.

When i run, it loads perfectly but when i click on the search button or press Enter or double click word in the listbox, it start "Not responding" for around 30 seconds. Then it works. But when tested in my friends PC it never returns from "Not responding" state.


Any help will be appreciated, TO OVER COME THIS "NOT RESPONDING" PROBLEM. Especially to make it Fast and Quick.
Thanks.
Dictionary code is as follows:
-----------------------------------------------------------
Public Class Form1

Private Sub Form1_Load(byVal sender As System.Object, byVal e As System.EventArgs) Handles MyBase.Load


a
ListBox1.Items.Add("a")
ListBox1.Items.Add("aba")
ListBox1.Items.Add("abah")
ListBox1.Items.Add("abey")
ListBox1.Items.Add("abi")
ListBox1.Items.Add("abie")
ListBox1.Items.Add("abii")
ListBox1.Items.Add("abo")





ListBox1.Sorted = True
End Sub

Private Sub AboutUsToolStripMenuItem_Click(byVal sender As System.Object, byVal e As System.EventArgs) Handles AboutUsToolStripMenuItem.Click
AboutBox1.Show()

End Sub

Private Sub EndToolStripMenuItem_Click(byVal sender As System.Object, byVal e As System.EventArgs) Handles EndToolStripMenuItem.Click
End

End Sub

Private Sub TextBox1_TextChanged(byVal sender As System.Object, byVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim Item As String = TextBox1.Text.ToString()
Dim index As Integer = ListBox1.FindString(Item)
If index = -1 Then
ListBox1.SelectedIndex = ListBox1.SelectedIndex
Else
ListBox1.SetSelected(index, True)

End If

End Sub

Private Sub button1_Click(byVal sender As System.Object, byVal e As System.EventArgs) Handles button1.Click




If TextBox1.Text ="a"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text ="Verb"
TextBox4.Text ="to come; to enter."
ElseIf TextBox1.Text ="aba"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text ="Adverb"
TextBox4.Text ="To come together/at the same time."
ElseIf TextBox1.Text ="abah"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text ="Adverb"
TextBox4.Text ="to come in addition to sb."
ElseIf TextBox1.Text ="abey"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text ="Adverb"
TextBox4.Text ="bored after coming regularly for a long time."
ElseIf TextBox1.Text ="abi"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text =""
TextBox4.Text ="to come on behalf of other."
ElseIf TextBox1.Text ="abie"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text =""
TextBox4.Text ="to come with pleasure."
ElseIf TextBox1.Text ="abii"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text =""
TextBox4.Text ="to have come."
ElseIf TextBox1.Text ="abo"Then
TextBox2.Text = TextBox1.Text
TextBox3.Text ="Adverb"
TextBox4.Text ="to come along with sb. Annii ageen ho paze atu si abo mondo.(the duckling is coming with its mother)."



Else
MsgBox("No Match Found!!")
End If
End Sub


Private Sub ListBox1_DoubleClick(byVal sender As System.Object, byVal e As System.EventArgs)
TextBox1.Text = ListBox1.SelectedItem
button1.PerformClick()
End Sub

Private Sub TextBox2_TextChanged(byVal sender As System.Object, byVal e As System.EventArgs) Handles TextBox2.TextChanged

End Sub

Private Sub MenuStrip1_ItemClicked(byVal sender As System.Object, byVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles MenuStrip1.ItemClicked

End Sub

Private Sub Form1_DoubleClick(byVal seNounder As System.Object, byVal e As System.EventArgs) Handles MyBase.DoubleClick

End Sub

Private Sub ListBox1_DoubleClick_1(byVal seNounder As System.Object, byVal e As System.EventArgs) Handles ListBox1.DoubleClick
TextBox1.Text = ListBox1.SelectedItem
button1.PerformClick()
End Sub

Private Sub SplashScreenToolStripMenuItem_Click(byVal sender As System.Object, byVal e As System.EventArgs) Handles SplashScreenToolStripMenuItem.Click
SplashScreen1.Show()

End Sub

Private Sub ListBox1_SelectedIndexChanged(byVal sender As System.Object, byVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

End Sub

Private Sub CreditsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreditsToolStripMenuItem.Click
Form2.Show()

End Sub
End Class
----------------------------------


View the full article
 
Back
Top