Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: a question about WebBrowser Pin
J4amieC26-Apr-06 23:59
J4amieC26-Apr-06 23:59 
QuestionHow to decode Octal email encode Pin
kiachik26-Apr-06 14:51
kiachik26-Apr-06 14:51 
AnswerRe: How to decode Octal email encode Pin
kiachik26-Apr-06 23:46
kiachik26-Apr-06 23:46 
QuestionGetting data from listview Pin
teejayem26-Apr-06 14:38
teejayem26-Apr-06 14:38 
AnswerRe: Getting data from listview Pin
Sean8926-Apr-06 15:13
Sean8926-Apr-06 15:13 
GeneralRe: Getting data from listview Pin
teejayem26-Apr-06 15:58
teejayem26-Apr-06 15:58 
GeneralRe: Getting data from listview Pin
Sean8926-Apr-06 16:01
Sean8926-Apr-06 16:01 
GeneralRe: Getting data from listview Pin
teejayem26-Apr-06 16:11
teejayem26-Apr-06 16:11 
Alright here is what i got going on:

This button does the openfile and puts it in the textboxes:

private void button1_Click(object sender, EventArgs e)
{
    OpenFileDialog music = new OpenFileDialog();
    music.Title = "Add a music file";
    music.InitialDirectory = "C:\\";
    music.Filter = "Supported File Types|*.mp3,*.wma|All files (*.*)|*.*";
    music.FilterIndex = 2;
    music.RestoreDirectory = false;

    if (music.ShowDialog() == DialogResult.OK)
    {
        music.Multiselect = true;
        foreach (string fileName in music.FileNames)
        {
            textBox1.Text = fileName;
            textBox2.Text = "Audio";
            textBox3.Text = "Pending";
        }
        string[] myItems = new string[]
            {
                textBox1.Text,
                textBox2.Text,
                textBox3.Text
            };
        ListViewItem lvi = new ListViewItem(myItems);

        listView1.Items.Add(lvi);
    }

}



what i'm wanting to do before i do file.copy is move the filename in the listview back to
textbox1.text (textbox2 and 3 also but it doesn't really matter as of right now)

private void button6_Click(object sender, EventArgs e)
{
    string path = textBox1.Text;
    string path2 = textBox4.Text;

    try
    {
        // Copy the file.
        File.Copy(path, path2);
        this.syncstat.Text = "Status: Files Copied";
    }

    catch
    {
        this.syncstat.Text = "Status:  Cannot copy into the same folder";
    }


Don't be overcome by evil, but overcome evil with good
GeneralRe: Getting data from listview Pin
teejayem26-Apr-06 16:16
teejayem26-Apr-06 16:16 
GeneralRe: Getting data from listview Pin
Sean8927-Apr-06 9:52
Sean8927-Apr-06 9:52 
AnswerRe: Getting data from listview Pin
Kuira26-Apr-06 21:38
Kuira26-Apr-06 21:38 
QuestionData Query 2 Pin
Sean8926-Apr-06 14:26
Sean8926-Apr-06 14:26 
AnswerRe: Data Query 2 Pin
Gerald Schwab26-Apr-06 17:20
Gerald Schwab26-Apr-06 17:20 
GeneralRe: Data Query 2 Pin
Sean8927-Apr-06 8:59
Sean8927-Apr-06 8:59 
QuestionDrag Image in Win RichTextBox Pin
amin_behzadi26-Apr-06 12:26
professionalamin_behzadi26-Apr-06 12:26 
QuestionCreating text file from SQL / XML in C# Pin
BusgGuy26-Apr-06 12:07
BusgGuy26-Apr-06 12:07 
AnswerRe: Creating text file from SQL / XML in C# Pin
HakunaMatada26-Apr-06 17:51
HakunaMatada26-Apr-06 17:51 
QuestionData Query Pin
Sean8926-Apr-06 11:33
Sean8926-Apr-06 11:33 
AnswerRe: Data Query Pin
Kayess Tech26-Apr-06 11:42
professionalKayess Tech26-Apr-06 11:42 
GeneralRe: Data Query Pin
Sean8926-Apr-06 11:48
Sean8926-Apr-06 11:48 
GeneralRe: Data Query Pin
Rob Graham26-Apr-06 12:32
Rob Graham26-Apr-06 12:32 
GeneralRe: Data Query Pin
Sean8926-Apr-06 12:50
Sean8926-Apr-06 12:50 
AnswerRe: Data Query Pin
Kuira26-Apr-06 14:10
Kuira26-Apr-06 14:10 
GeneralRe: Data Query Pin
Sean8926-Apr-06 14:29
Sean8926-Apr-06 14:29 
QuestionApplication Focus Pin
Kayess Tech26-Apr-06 11:30
professionalKayess Tech26-Apr-06 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.