Click here to Skip to main content
15,889,651 members
Home / Discussions / C#
   

C#

 
QuestionHow to control a outer application? [modified] Pin
imbiz3-Jun-10 23:46
imbiz3-Jun-10 23:46 
AnswerRe: How to control a outer application? Pin
Luc Pattyn4-Jun-10 0:38
sitebuilderLuc Pattyn4-Jun-10 0:38 
GeneralRe: How to control a outer application? Pin
imbiz4-Jun-10 2:20
imbiz4-Jun-10 2:20 
GeneralRe: How to control a outer application? Pin
Luc Pattyn4-Jun-10 7:18
sitebuilderLuc Pattyn4-Jun-10 7:18 
GeneralRe: How to control a outer application? [modified] Pin
imbiz4-Jun-10 21:39
imbiz4-Jun-10 21:39 
Questionlistbox Pin
kennyhibs3-Jun-10 22:30
kennyhibs3-Jun-10 22:30 
AnswerRe: listbox Pin
Peace ON3-Jun-10 23:34
Peace ON3-Jun-10 23:34 
GeneralRe: listbox Pin
kennyhibs4-Jun-10 21:39
kennyhibs4-Jun-10 21:39 
Thanks for reply, i've removed second list box as i dont think it has any use for what i want it to do.
i now use the textbox to change name of listbox1 selecteditem and i am now trying to rename the actual file with "file.move" but i'm having a problem with second part of "file.move"

private void fileSystemWatcher1_Created(object sender, System.IO.FileSystemEventArgs e)
   {
       listBox1.Items.Add(e.FullPath);
       listBox1.SelectedIndex = listBox1.Items.Count - 1;
       listBox1.SelectedIndex = -1;
               }

   private void listBox1_Click(object sender, EventArgs e)
   {

       int itemSelected = this.listBox1.SelectedIndex;
       string itemText = this.listBox1.Items[itemSelected].ToString();

       Rectangle r = this.listBox1.GetItemRectangle(itemSelected);
       this.textBox1.Location = new System.Drawing.Point(r.X + 217, r.Y + 520);
       this.textBox1.Size = new System.Drawing.Size(r.Width + 4, r.Height - 10);
       this.textBox1.Visible = true;
       this.textBox1.Text = itemText;
       this.textBox1.Focus();
       this.textBox1.SelectAll();

   }


   private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
   {


       if (e.KeyChar == 13)

       {
           File.Move(Path.GetFullPath(listBox1.SelectedItem.ToString()), this.textBox1.Text.ToString()+".avi" );
           this.listBox1.Items[this.listBox1.SelectedIndex] = this.textBox1.Text;

           this.textBox1.Visible = false;



       }
       if (e.KeyChar == 27)
           this.textBox1.Visible = false;



It renames the file ok but moves file to debug directory of my project instead of leaving it where it is and just renaming it


kenny
Questionwant to change theme of controls..... Pin
jainiraj3-Jun-10 19:54
jainiraj3-Jun-10 19:54 
AnswerRe: want to change theme of controls..... Pin
Johnny J.3-Jun-10 21:16
professionalJohnny J.3-Jun-10 21:16 
AnswerRe: want to change theme of controls..... Pin
Abhinav S3-Jun-10 21:31
Abhinav S3-Jun-10 21:31 
GeneralRe: want to change theme of controls..... Pin
Johnny J.3-Jun-10 22:11
professionalJohnny J.3-Jun-10 22:11 
AnswerRe: want to change theme of controls..... Pin
Dave Kreskowiak4-Jun-10 1:45
mveDave Kreskowiak4-Jun-10 1:45 
GeneralRe: want to change theme of controls..... Pin
Johnny J.4-Jun-10 2:25
professionalJohnny J.4-Jun-10 2:25 
GeneralRe: want to change theme of controls..... Pin
Dave Kreskowiak4-Jun-10 4:36
mveDave Kreskowiak4-Jun-10 4:36 
QuestionHow to Create DB in SQL server Pin
Joe Rozario3-Jun-10 18:05
Joe Rozario3-Jun-10 18:05 
AnswerRe: How to Create DB in SQL server Pin
dan!sh 3-Jun-10 18:26
professional dan!sh 3-Jun-10 18:26 
GeneralRe: How to Create DB in SQL server Pin
Joe Rozario4-Jun-10 0:14
Joe Rozario4-Jun-10 0:14 
AnswerRe: How to Create DB in SQL server Pin
Gonzalo Cao4-Jun-10 3:29
Gonzalo Cao4-Jun-10 3:29 
QuestionDisparity between value semantics behavior with List< struct > vs. array of struct Pin
Stache3-Jun-10 15:07
Stache3-Jun-10 15:07 
AnswerRe: Disparity between value semantics behavior with List vs. array of struct [modified] PinPopular
Anthony Mushrow3-Jun-10 17:19
professionalAnthony Mushrow3-Jun-10 17:19 
GeneralRe: Disparity between value semantics behavior with List vs. array of struct Pin
Stache4-Jun-10 4:23
Stache4-Jun-10 4:23 
QuestionEnglish wordlist database for word processing app?? Pin
Jaison V3-Jun-10 7:57
Jaison V3-Jun-10 7:57 
AnswerRe: English wordlist database for word processing app?? Pin
#realJSOP3-Jun-10 8:14
mve#realJSOP3-Jun-10 8:14 
GeneralRe: English wordlist database for word processing app?? [modified] Pin
Jaison V3-Jun-10 21:16
Jaison V3-Jun-10 21:16 

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.