C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

System.IO; Ecception?


Posted Date: 05 Nov 2009      Posted By: Ramesh M      Member Level: Silver     Points: 1   Responses: 5



hi,

this is Ramesh

i have winforms insight have one picture box ,when doule click i right logic write(stream class) picture then store one of the system folder..when i tring to write i got error like "can't access file it's being processed another"
how this over come ....?

anybody give me soln for my query..

advance wishes......





Responses

Author: Dharmaraj    05 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,
When you are dealing with images, make sure that the image file is no more in use. If you are using stream class, make sure that at the end you are closing the stream class.

Regards,
Dharma
Editor,Mentor,MVM
Try and fail but don't fail and try
Me and DNS



Author: vipul    05 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,
for that you can refer this link they provide solution
http://stackoverflow.com/questions/876473/c-is-there-a-way-to-check-if-a-file-is-in-use

Please Rate This Answer If They Helpful

Thanks & Regards
Patel Vipul



Author: Anuraj    05 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

As Dharmaraj said make sure the stream is released. Normally IO exception will occur due this.

Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Author: soniumesh    05 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi,


You are going to write(stream class) picture then store one of the system folder in that on store system folder system is still now use your image for write purpose.

So, put some thread between write ans store process.

Regard,
umesh soni



Author: Anil Kumar Pandey    05 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

make sure no other object is using that file..
if yeas release the file first and start reading or writing..

Thanks & Regards
Anil Kumar Pandey



Post Reply
You must Sign In to post a response.
Next : Open a two winform simultaneously
Previous : How to over come the issue "Cannot create a file when that file already exists"
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use