Which part of this specifically are you having trouble with?
A very simple example of this could be the following:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Net;
using System.Text;
using System.Windows.Forms;
namespace ConsoleApplication42
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
{
string[] lines = File.ReadAllLines(openFileDialog1.FileName);
listBox1.DataSource = lines;
}
}
private void listBox1_DoubleClick(object sender, EventArgs e)
{
Clipboard.SetText(listBox1.SelectedItem.ToString());
}
}
}
Of course, this requires you to have added a ListBox, a button and an OpenFileDialog to the form, and you've handled the button's click event, and the listBox's DoubleClick event.
Coding Light - Illuminated Ideas and Algorithms in SoftwareCoding Light Wiki �
LinkedIn �
ForumsBrowser