Click here to Skip to main content
14,920,001 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Can someone tell me how this process works? My goal is I want to get the certain details on the image and put it on a text file. can someone teach me how?

When this Copying process happens, the details



in the MoveFileWithProgress will be copied and will be pasted inside a text file :)
The question is not quite clear. Do you want to show the progress in copying of a separate file? From where to where? You may need to write your own version of Copy block by block, then you can introduce the progress event when one block is complete. Or do you just want to know how it works somewhere? Then I explained it above.

1 solution

Please see my comment to the question, which is not quite clear. I gave you one recipe if you want to implement such behavior in replacement of System.IO.File.Move ([^]). The benefit of such approach: you won't need to use P/Invoke, which will preserve platform compatibility of your code.

With P/Invoke, you can use native windows API MoveFileWithProgress. Everything is already done for you:[^].

You choose.

AkemiChou 4-Feb-14 14:24pm
I'd been there already, is there any possibilities that I can inherit something from MoveFileWithProgress when the copying process of windows is happening?
"Inherit" is a notion from OOP, it is not applicable to non-OO Windows API. You need to use it exactly is it requires, by supplying, in terms of CLI, a delegate for moving a bunch. Do you have any problem with that?
However, I really advise to use first approach: write your own Move, to get access to the events where the single block is moved (read, written). Define some reasonable block size or make it a parameter. Do you need any further help with that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900