Saving File

han

Member
Joined
Aug 7, 2003
Messages
5
Hi guys...I need some guide here...

I have an application that allowed me to open a txt file as my storage (SaveFileDialog)

and Save ("Save As...") everything after I edit the data.


Until now, I can only use "Save As..." to save the file...

Is there any way that I can maintain a "last file accessed". (Just "Save")

So it never ask me for the file name again, if I want to save to the file that I opened recently

Thanks
 
You only need to store the last file accessed somewhere in memory (a Public/Private String in the class would be fine)... then check the .Length of this string and if its larger than 0, Save the file to the filename in the string.
When you click New, be sure to clear it, and when you click Open, be sure to set it to the file that is being opened.
When you click Save As, dont check the filename that you have. :)
 

Similar threads

Back
Top