이 당신을 위해 무엇을 찾고 있습니다,하지만 난 당신보다 더 찾을 수 있다고 생각하는 경우 확실하지 않음이
MouseDown를 호출 할 때이 작업을 시도 할 수
private void richTextBox1_MouseDown(object sender, MouseEventArgs e)
{
// Continue if the Right mouse button was clicked
if (e.Button == MouseButtons.Right)
{
// Check if the selected item starts with http://
if (richTextBox1.SelectedText.IndexOf("http://") > -1)
{
// Avoid popping the menu if the value contains spaces
if (richTextBox1.SelectedText.Contains(' '))
{
// Show the menu
contextMenuStrip1.Show(Cursor.Position.X, Cursor.Position.Y);
}
}
}
}
또는이 링크를 클릭 할 때, 그러나 이것은 마우스에 대한 적용되지 않습니다 마우스 오른쪽 단추로 클릭
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{
contextMenuStrip1.Show(Cursor.Position.X, Cursor.Position.Y);
}
고마워,
나는 이것이 도움이되기를 바랍니다.