Forms Delphi

Title: How to close a TCommonDialog automatically
SendMessage(GetParent(OpenDialog1.Handle), WM_SYSCOMMAND, SC_CLOSE, 0);