Re: Abort a downloadfile()
Posted: Mon Aug 14, 2023 10:06 pm
This my code for download, no surprise, thanks a lot Andreas one more time!
and this is my code to 'Abort' the download with a button:
Code: Select all
handle = Downloadfile(a1$, {Async=True, Adapter="hurl", File=f$}, p_SetProgress)
Repeat done = ContinueAsyncOperation(handle)
VWait
Until done = TrueCode: Select all
Case "Pressed":
Switch msg.ID
Case "abort":
CancelAsyncOperation(handle)
done = True
Endswitch