Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Aseem Sharma5-Sep-10 5:35
Aseem Sharma5-Sep-10 5:35 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Not Active5-Sep-10 5:56
mentorNot Active5-Sep-10 5:56 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Aseem Sharma5-Sep-10 6:20
Aseem Sharma5-Sep-10 6:20 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Dave Kreskowiak5-Sep-10 11:09
mveDave Kreskowiak5-Sep-10 11:09 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Aseem Sharma5-Sep-10 19:59
Aseem Sharma5-Sep-10 19:59 
AnswerRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Luc Pattyn5-Sep-10 6:26
sitebuilderLuc Pattyn5-Sep-10 6:26 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Aseem Sharma5-Sep-10 6:39
Aseem Sharma5-Sep-10 6:39 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Dave Kreskowiak5-Sep-10 11:11
mveDave Kreskowiak5-Sep-10 11:11 
Aseem Sharma wrote:
The process cannot access the file 'MyPhotograph.jpg' because it is being used by another process.


That process is either your own app because you created and Image or Bitmap using a .FromFile method, which keeps the file open for the lifetime of the Image or Bitmap object. You have to use a different method for getting the image without locking the file open. This would probably be supplying your own FileStream object, opeing the file, then passing that to the contructor of the Image or Bitmap object, then closing the file. That process does not lock the file allowing you to do whatever you want.

AnswerRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Pete O'Hanlon5-Sep-10 7:29
mvePete O'Hanlon5-Sep-10 7:29 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Aseem Sharma5-Sep-10 20:02
Aseem Sharma5-Sep-10 20:02 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
NarVish6-Sep-10 0:04
NarVish6-Sep-10 0:04 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
Pete O'Hanlon6-Sep-10 0:33
mvePete O'Hanlon6-Sep-10 0:33 
GeneralRe: Not able to delete original jpeg file after it is copied with System.IO.File.Copy() Pin
NarVish6-Sep-10 1:39
NarVish6-Sep-10 1:39 
QuestionProblem : Need to make COM InterOp at runtime using reflections Passing Pointers as parameters? Pin
glitteringsound4-Sep-10 20:23
glitteringsound4-Sep-10 20:23 
Questioncreating an own file for my application Pin
prasadbuddhika4-Sep-10 6:50
prasadbuddhika4-Sep-10 6:50 
AnswerRe: creating an own file for my application Pin
Not Active4-Sep-10 7:34
mentorNot Active4-Sep-10 7:34 
AnswerRe: creating an own file for my application Pin
DaveyM694-Sep-10 7:54
professionalDaveyM694-Sep-10 7:54 
AnswerRe: creating an own file for my application Pin
DaveAuld4-Sep-10 7:59
professionalDaveAuld4-Sep-10 7:59 
AnswerRe: creating an own file for my application [modified] Pin
Luc Pattyn4-Sep-10 9:20
sitebuilderLuc Pattyn4-Sep-10 9:20 
AnswerRe: creating an own file for my application Pin
OriginalGriff4-Sep-10 10:25
mveOriginalGriff4-Sep-10 10:25 
AnswerRe: creating an own file for my application Pin
Expert Coming4-Sep-10 22:12
Expert Coming4-Sep-10 22:12 
QuestionHii I am working on project and want to get some data from dataset and want to create and ink stroke Pin
googlejumbo4-Sep-10 6:20
googlejumbo4-Sep-10 6:20 
AnswerRe: Hii I am working on project and want to get some data from dataset and want to create and ink stroke Pin
Luc Pattyn4-Sep-10 6:40
sitebuilderLuc Pattyn4-Sep-10 6:40 
QuestionHow to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
glitteringsound4-Sep-10 5:14
glitteringsound4-Sep-10 5:14 
AnswerRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
Not Active4-Sep-10 5:30
mentorNot Active4-Sep-10 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.