Exemplo n.º 1
0
 protected Object CrossThreadGetSelectedItem(ListBox lbox)
 {
     if (this.InvokeRequired)
     {
         CrossThreadGetSelectedItemDelegate d = this.CrossThreadGetSelectedItem;
         return(this.Invoke(d, new Object[] { lbox }));
     }
     return(lbox.SelectedItem);
 }
Exemplo n.º 2
0
 protected Object CrossThreadGetSelectedItem(ListBox lbox)
 {
     if (this.InvokeRequired)
     {
         CrossThreadGetSelectedItemDelegate d = new CrossThreadGetSelectedItemDelegate(this.CrossThreadGetSelectedItem);
         return this.Invoke(d, new Object[] { lbox });
     } 
     else 
     {
         return lbox.SelectedItem;
     }
 }