By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Save a file

P: n/a
hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx
--
Alvo von Cossel I of Germany
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I don't understand where the textbox comes into it. How is that
relevant to what your save button does?

In any case, you would have to save the filename the user chooses the
first time, and persist it someplace where you can get at it in
subsequent saves. Then you would bypass the save as dialog thereafter.
Depending on your requirements you might check to make sure the file
exists, too.

Often, though, the presence of the SaveAs dialog would be desirable even
for subsequent saves. Maybe the user wants to save another copy of the
file, for instance, or change the location. You could default the
filename to be the same as last time and then the user just has one
extra mouse click with the dialog if they don't want to change anything.

--Bob

Alvo von Cossel I wrote:
hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx

Nov 17 '05 #2

P: n/a
hi,

well the textbox contains the text that i want to save. thanks for the answer
--
Alvo von Cossel I of Germany
"Bob Grommes" wrote:
I don't understand where the textbox comes into it. How is that
relevant to what your save button does?

In any case, you would have to save the filename the user chooses the
first time, and persist it someplace where you can get at it in
subsequent saves. Then you would bypass the save as dialog thereafter.
Depending on your requirements you might check to make sure the file
exists, too.

Often, though, the presence of the SaveAs dialog would be desirable even
for subsequent saves. Maybe the user wants to save another copy of the
file, for instance, or change the location. You could default the
filename to be the same as last time and then the user just has one
extra mouse click with the dialog if they don't want to change anything.

--Bob

Alvo von Cossel I wrote:
hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.