Trapping KeyPress when ProgessDialogShow is happening

Inman

Well-Known Member
Licensed User
Longtime User
I have a download in progress and I show a progressdialogshow window until the download finishes. Now if a user presses the physical back button, I want to cancel the asynchronous download by closing the outputstream.

But the issue is when a progressdialogshow is happening, the keypresses are not trapped inside Activity_KeyPress event. Instead when the user clicks the back button, the progressdialogshow window disappears but the actual process is still continuing.

Where can I trap the keypress when there is a progressdialogshow in progress?
 

susu

Well-Known Member
Licensed User
Longtime User
You can instead show a progress bar and actually show the progress by measuring the file size with a timer.

Can you please make an example, Erel?
 
Upvote 0
Top