Пример #1
0
        private void copyText_Click(object sender, EventArgs e)
        {
            Control sourceControl = GetSourceControl(sender);

            MessageControl.Message msg = sourceControl as MessageControl.Message;
            Clipboard.SetText(msg.Text);
        }
Пример #2
0
 private void MessageViewer_ControlAdded(object sender, ControlEventArgs e)
 {
     messageViewer.ScrollControlIntoView(e.Control);
     MessageControl.Message m = e.Control as MessageControl.Message;
     m.ContextMenuStrip = copyMessageText;
 }