c# - Search data in listbox in form 1 on another listbox in form2 -
i have problem code, want search on listbox4 on form2 in listbox 5 on form1.
i used code shown below:
int index= eski.listbox5.findstring(listbox4.tostring()); if(index= !=-1) eski[enter image description here][1].listbox5.setselected(index ,true); else messagebox.show("nothing found")
programme finds true index value set selected command doesn't work..
how can solve problem?
listbox4.tostring()
going return control string. call listbox4.getitemtext(listbox4.selecteditem)
instead. also, line 2 should if (index != -1)
Comments
Post a Comment