file in used?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

file in used?
Dummy1912
Hello Friends,

so who can helpme out.
i have search and tried and nothing works.

if i load a image into the exist record.
after i want to redit the record

i want to change the image
but when i press save i get file in used.

even if i do
.close
.flush
.close

it stays the same error.

file save method i use:
Code: Select all
Dim ObjectR As New StreamWriter(Application.StartupPath &  LabelM.Text & ".pl", False)
ObjectR.WriteLine(Objects)
ObjectR.Close()
false ---> to makes the file empty to readd the line.
it don't matter even if i set it false or even true or nothing
its stays error.
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: file in used?
MrAksel
You may have to post the code for loading the image. If you don't close the file after loading, the code you posted will fail.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: file in used?
Dummy1912
haha funny aksel
this is the file to load the image :p
the location of the file is in there.
and the objects contains the file
so it just copy it to the clipboard and past it
i even clean the clipboard after it.
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: file in used?
MrAksel
Uhm, whats funny? I didn't mean to be funny. I asked you to post the code where you load the image :)
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: file in used?
clanc789
MrAksel wrote:
Uhm, whats funny? I didn't mean to be funny. I asked you to post the code where you load the image :)
It was quite funny though :D
Practice makes perfect!

VIP since: 6-10-2011
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: file in used?
Dummy1912
sorry guys
Last edited by Dummy1912 on Thu Apr 26, 2012 7:01 am, edited 1 time in total.
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: file in used?
MrAksel
I'm sorry I can't help you, but it looks like you have done everything correct. I have no idea :?
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: file in used?
Dummy1912
well thanks anyway mr aksel
i found the bug

i forgot a .close at some line :)
sorry
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
8 posts Page 1 of 1
Return to “Coding Help & Support”