Which function can close a dialog box or window?

I don’t find the function to close a dialog box or window. Can you tell me?
Thanks for any info.

Zhou Jun