listBox1_SelectedIndexChanged

  • Thread starter Thread starter Kun
  • Start date Start date
K

Kun

Dear all,

Can we avoid listBox1_SelectedIndexChanged from fire?

My problem is during form load I fill listbox with employee name.

In listBox1_SelectedIndexChanged event detail information of the employee
will fill in bind to other textbox.

I think when form load the listBox1_SelectedIndexChanged event might fired
automatically, am I right?
If so how can I avoid it from fire auto when form loading.

Regards,
Kun
 
Hi,
Use a Boolean class variable IsFill and set it to true initially, in the
listBox1_SelectedIndexChanged event if the flag is true just exit

If Not IsFill Then
'do the required stuff
End If


Cheers
Benny
 
Back
Top