Tôi đang cố mở một số contextmenustrip
tại vị trí mà tôi đã nhấp chuột phải, nhưng nó luôn hiển thị ở trên cùng bên trái của màn hình.Không thể đặt vị trí của contextmenustrip?
Đây là mã tôi đã sử dụng:
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));
}
}
nền tảng của bạn sẽ giúp rất nhiều. (silverlight, wpf, asp.net, winforms, v.v.) –