why can't i delete the temp file?

lqg2118

Member
Licensed User
Longtime User
FileOpen(c2,"temp.jpg",cRandom)
binwrite.New1(c2,True)
......
binwrite.WriteBytes2(......)
FileClose(c2)

image1.Image="temp.jpg"

__________________

after that,if i want delete temp.jpg,what should i do?

current situation is even if after appclose,i still can't delete it or rewrite it.
 

agraham

Expert
Licensed User
Longtime User
The image file stays locked as long as any bitmap loaded from it exists, in your case Image1 by the look of it. This is a feature of the .NET Framework. If running from the IDE the system may think the IDE still owns the file even after your app has closed. You might need to exit the IDE to delete it.
 

lqg2118

Member
Licensed User
Longtime User
I tried it in compiled exe,still can not delete the temp file.

since you said it's .net 2.0's limitation,i think i should give up deleting the temp file.
 
Last edited:

mjcoon

Well-Known Member
Licensed User
...since you said it's .net 2.0's limitation,i think i should give up deleting the temp file.

That's not really what Andrew Graham implied. Are you sure that you are disposing the Image1 that he mentioned as being the probable reason for the file remaining locked?

Mike.
 

lqg2118

Member
Licensed User
Longtime User
That's not really what Andrew Graham implied. Are you sure that you are disposing the Image1 that he mentioned as being the probable reason for the file remaining locked?

Mike.

hi,Mike

I had disposed the image1,still could not delete the temp file.only quiting IDE could.

but I have solved this problem. because

it's not the trouble with the IDE OR compiled exe

it's a trouble or difference from desktop and device!

my same code is running properly(deleted temp file successfully) on wm6.5 device,what ever IDE OR compiled exe.
 
Last edited:

lqg2118

Member
Licensed User
Longtime User
@lqg2118, please send an email to support@basic4ppc.com with your purchase details. You appear as an unlicensed user for some reason.

thank you Erel,your solution does work.

Sorry,:sign0013:I am really a unlicensed user for I don't know how to pay it and I don't have any american dollars,I wonder whether can I pay it by CHINA'S RMB$

I'd like to pay it,just not familiar with the way to purchase,could you tell me?

and I suggest you create an account on www.taobao.com, the No.1 E-commerce website in China,so Chinese user could purchase b4p easily.

I didn't use b4p for any Commercial purposes,and i will not before paying it.

i'm only a beginner and just starting to learn it,though it's easy to learn and use,it's still difficult for me because it's english version.
 
Last edited:

lqg2118

Member
Licensed User
Longtime User
You can purchase Basic4ppc with your own currency. If you are having trouble please contact me and I'll assist you.

OK,Erel.

please give me detail steps to purchase,i will pay RMB$.

i like basic4ppc,it's so funny!
 

lqg2118

Member
Licensed User
Longtime User
You can change the currency in the order page. You should find China CNY which I believe is the same currency.



it's a heavy task for me!
changing currency seemed automaticlly complete...

I have purchased an android version for i can't find the ppc version in your purchase page.

if you think it's not proper,give me the money back and let me purchase ppc version again.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…