title: Getting the X/Y coordinates of the "current cell" in a DataGridView?
body: <p>[using VB 2010 / Winforms]</p>
  
  <p>I have a DataGridView with several columns. It's unbound, and not connected to any sort of database or anything -- I am simply populating it cell by cell based on user input.</p>
  
  <p>So anyways, one of the columns in the DGV is of type "image" (DataGridViewImageColumn).</p>
  
  <p>What I'm trying to do is whenever one of the image cells is clicked, a context menu strip is shown at the exact loaction where the image cell is clicked.</p>
  
  <p>Here's what I've got so far...</p>
  
  <pre><code>Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
  
          Dim columnName As String = DataGridView1.Columns(e.ColumnIndex).Name
          If columnName = "Image" Then 
           Me.Status_ContextMenuStrip1.Show(Me.DataGridView1.CurrentCell.ContentBounds.Location) ' &lt;-- This isn't right, but I must be close!
          End If
  
  End Sub
  </code></pre>
  
  <p>When I run the above code and click on an image cell, the context menu appears, but it appears at the very top left corner of the screen. How can I get it to appear at the exact location that the clicked cell is at? I'd actually like it to appear just below the clicked cell, so that it has a similar visual effect to a combobox "drop down" (and I know how to offset the X and Y coordinates as soon as I can figure out how to get it in the general vicinity of where it needs to be).</p>
  
  <p>Thanks!</p>