In button click event how to export & delete a file at a time

jayawant

Member
Joined
Apr 25, 2011
Messages
21
Programming Experience
1-3
Hi,

In windows form in button click event how to export the file in a location select by showdialog & it will be delete permanently at a same time.How can i do this!
because in .net it will produces error "IO Exception was unhandled" or "The process can not access the file because it is used by anather process." .In button click event how to export the file & delete at same time in vb.net windows application.To avoid that issue.Please help me.

Thanks,
 
It is not the case that:
in .net it will produces error "IO Exception was unhandled" or "The process can not access the file because it is used by anather process."
What is the case is that your code produces those errors. As we have not seen your code, we can't possibly know what's wrong with it.

That said, the second error message is fairly obvious. The file you're trying to operate on is open somewhere, either in your app or another. If it's your app, either close it or don't open it in the first place. As to how or why you're opening it, we can't possibly know because we haven't seen your code.
 
Back
Top