Here are some example blocks. See how the DismissProgressDialog block is in a different event from the ShowProgressDialog. Your procedure (the part inbetween show and dismiss) needs to be long enough for the dialog to show, otherwise it may just blink the screen.
