Capture screen does not capture active dialog

If my application has an active dialog window open on top of base window and I use capture screen command, the image of the base window is captured but the dialog is not! is there any way to correct this?