私はマウスを右クリックしたところでcontextmenustrip
を開こうとしていますが、画面の左上には常に表示されます。ここでコンテキストメスの位置を設定できませんか?
は、私が使用するコードです:
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(new Point(e.X,e.Y));
doss.getdossier(connection.conn, Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value));
}
}
あなたのプラットフォームがたくさん役立つだろう。 (silverlight、wpf、asp.net、winformsなど) –