Results 1 to 3 of 3

Thread: [C#] Save Textbox?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2008
    Posts
    207

    [C#] Save Textbox?

    I am working on a program that streams music. I have it so people browse for a directory that there music is in, it shows the directory's path in a textbox and then it sends the contents to a listBox. What I'm trying to do is make it so the next time they open up the application it automatically goes to the directory they specified when they first ran the application. How would I do that?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [C#] Save Textbox?

    I would create a Setting for it, then bind the TextBox' Text property to the setting.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [C#] Save Textbox?

    Further to what Atheist posted, you can create the setting and the binding from the (ApplicationSettings) node in the properties window for the TextBox. Once that's done the data will be loaded and saved automatically at startup and shutdown.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width