回覆列表
  • 1 # 使用者7941529551078

    private void ListView_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.C) { if (ListView.Items.Count > 0) { int col = ListView.Columns.Count; StringBuilder sb = new StringBuilder(); foreach (ListViewItem item in ListView.SelectedItems) { if (item.Text != "") { for (int i = 0; i < col; i++) { sb.Append(item.SubItems[i].Text); if (i == col - 1) sb.Append("\r\n"); } } } Clipboard.SetDataObject(sb.ToString()); } } }

  • 中秋節和大豐收的關聯?
  • 世界盃足球競彩,如何贏的機率高?