System.Windows.Forms.ListBox.IndexFromPoint C# (CSharp) Method

IndexFromPoint() public method

public IndexFromPoint ( Point p ) : int
p Point
return int
		public int IndexFromPoint (Point p)
		{
			return IndexFromPoint (p.X, p.Y);
		}

Same methods

ListBox::IndexFromPoint ( int x, int y ) : int

Usage Example

 private void list2_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (list2.IndexFromPoint(e.X, e.Y) < 0)         //>list2.Items.Count){
     {
         return;
     }
     UserQueryCur      = UserQueries.List[list2.IndexFromPoint(e.X, e.Y)];
     textQuery.Text    = UserQueryCur.QueryText;
     textTitle.Text    = UserQueryCur.Description;
     textFileName.Text = UserQueryCur.FileName;
 }
All Usage Examples Of System.Windows.Forms.ListBox::IndexFromPoint