zFrank Posted August 19, 2008 Share Posted August 19, 2008 i need a different type of Copy/Delete Progress Bar not like windows default. anyone can help me? [font="Georgia"]GSM Expert[/font] but not AutoIt :DProud to be Admin Of : http://www.gsmhosting.net/visit my Forum... http://www.gsmhosting.net/vbb/index.php$Life = "Happy" If @Error Then $Life = "Risk" Link to comment Share on other sites More sharing options...
rasim Posted August 20, 2008 Share Posted August 20, 2008 zFrankTry this:Global Const $PROGRESS_CONTINUE = 0 Global Const $PROGRESS_CANCEL = 1 Global Const $PROGRESS_STOP = 2 Global Const $PROGRESS_QUIET = 3 _FileCopyEx("d:\Video\Clips\New\02.avi", "c:\02.avi") Func _FileCopyEx($Source, $Dest) If Not FileExists($Source) Then Return SetError(1, 0, 0) ProgressOn("_FileCopyEx() Demo", "Copy, please wait...") $pCopyProgressRoutine = DllCallbackRegister("_CopyProgressRoutine", "int", "uint64;uint64;uint64;uint64;dword;dword;ptr;ptr;ptr") DllCall("kernel32.dll", "int", "CopyFileEx", _ "str", $Source, _ "str", $Dest, _ "ptr", DllCallbackGetPtr($pCopyProgressRoutine), _ "ptr", 0, _ "int", 0, _ "int", 0) DllCallbackFree($pCopyProgressRoutine) Sleep(1000) ProgressOff() EndFunc Func _CopyProgressRoutine($TotalFileSize, $TotalBytesTransferred, $StreamSize, $StreamBytesTransferred, $dwStreamNumber, $dwCallbackReason, $hSourceFile, $hDestinationFile, $lpData) $Percent = $TotalBytesTransferred / $TotalFileSize * 100 ProgressSet($Percent, "Percent: " & Round($Percent, 1) & "%") Return $PROGRESS_CONTINUE EndFunc ;==>_CopyProgressRoutineMSDN:CopyFileExCopyProgressRoutine Link to comment Share on other sites More sharing options...
zorphnog Posted August 20, 2008 Share Posted August 20, 2008 Nice example @rasim! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now