Dim pos = DataGridView1.CurrentCellAddress TextBox1.Visible = (pos.X >= 0 AndAlso pos.Y >= 0) If Not TextBox1.Visible Then Return Dim cutOverflow = True '溢れた領域を切り捨てるかどうか Dim r As Rectangle = DataGridView1.GetCellDisplayRectangle(pos.X, pos.Y, cutOverflow) TextBox1.SetBounds(r.Left, r.Top, r.Width, r.Height)