![]() |
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. |
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. |
Re: Auto Save
Or you can use System.Windows.Forms.Timer to call the save method e.g every 2 minutes, 2 hours etc.
|
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. |
Re: Auto Save
Quote:
|
| All times are GMT -5. The time now is 3:39 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC