![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
Auto Save
i have been tryin to figure out how i can take like text i have in my program and have it auto save in a .txt file where the application is at.
i have searched and searched google and havent been able to find anything on it so if someone could help me i would like it. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
Re: Auto Save
As far as I know, there's no feature in VB that allows you to do this automatically. You'll have to program a function that's triggered for the text field update event. You will program this function to grab the current value of the text field and save it to a .txt file. That way, every time the text is changed, you have that value updated in a text file.
Then when the program's loaded, use the "on load" event to trigger a separate function. You will program this function to do the inverse: grab the contents of the .txt file and put it back in the field of the text control. |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0
![]() |
Re: Auto Save
Or you can use System.Windows.Forms.Timer to call the save method e.g every 2 minutes, 2 hours etc.
|
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 335
Rep Power: 4
![]() |
Re: Auto Save
System.Windows.Forms.Timer isn't relevant to this forum - but the Timer control is. (Note: this is not VB.NET land, but classic VB land, unless I'm much mistaken...)
To use the timer control, just drop it onto a form, give it a sensible name and then catch its Timer event.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
|
|
#5 | |
|
Programmer
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0
![]() |
Re: Auto Save
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 101 Ways To Help Save The Planet | justlukeyou | Coder's Corner Lounge | 61 | Jun 20th, 2007 1:04 PM |
| How to save all search engine results urls in a text file | abojan | ASP | 0 | Dec 27th, 2006 9:33 AM |
| help on save and save as methods | Yarvin | Python | 2 | Nov 9th, 2006 9:01 PM |
| How to save the array vars in a class? | cCj | PHP | 2 | Aug 6th, 2006 1:20 AM |
| IE Compatibility, margin: auto; (centering) | dezza | HTML / XHTML / CSS | 8 | Nov 18th, 2005 4:41 AM |