1.14.1. fejezet Clipboard
Beküldte pzoli - 2016, június 3 - 12:22du
private void copyClick(object sender, EventArgs e) { if (System.Windows.Forms.Clipboard.ContainsText(TextDataFormat.Html)) { richTextBox.Text = Clipboard.GetText(TextDataFormat.Html); tabControl.SelectedIndex = 0; } else if (System.Windows.Forms.Clipboard.ContainsText(TextDataFormat.Text)) { richTextBox.Text = Clipboard.GetText(TextDataFormat.Text); tabControl.SelectedIndex = 0; } else if (System.Windows.Forms.Clipboard.ContainsText(TextDataFormat.Html)) { richTextBox.Text = Clipboard.GetText(TextDataFormat.Html); tabControl.SelectedIndex = 0; } else if (System.Windows.Forms.Clipboard.ContainsText(TextDataFormat.Rtf)) { richTextBox.Text = Clipboard.GetText(TextDataFormat.Rtf); tabControl.SelectedIndex = 0; } else if (System.Windows.Forms.Clipboard.ContainsImage()) { pictureBox.Image = Clipboard.GetImage(); tabControl.SelectedIndex = 1; } else if (System.Windows.Forms.Clipboard.ContainsFileDropList()) { listBox.Items.Clear(); foreach(String item in System.Windows.Forms.Clipboard.GetFileDropList()) { listBox.Items.Add(item); } tabControl.SelectedIndex = 2; }
- A hozzászóláshoz be kell jelentkezni