oDlg = Createobject("GetFileEx") ? oDlg.GetFile() DEFINE CLASS GetFileEx AS form Left = 100 && Set Dialog Position by positioning the form Top = 100 && Set Dialog Position Name = "GetFIleEx" DoCreate = .T. Visible = .F. ADD OBJECT oCDC AS OleControl WITH ; OleClass = "MsComDlg.CommonDialog" PROCEDURE GetFile(tnInitColor) LOCAL lnColor Thisform.oCDC.ShowOpen() ENDPROC ENDDEFINEIt will also prevent error described in BUG: License Error with ActiveX Control Added at Run-Time mskb #192693.
loOleControl = CREATEOBJECT("MSComDlg.CommonDialog") >... >loOleControl.ShowOpen() >lcFilename = loOleControl.FileName >>This works well, but I have two problems.