* Start up program. LPARAMETERS tcMemberID, tcSourceDir SET SAFETY OFF _screen.Visible = .F. oViewer = CREATEOBJECT('Viewer') oViewer.LoadFiles(tcMemberID, tcSourceDir) READ EVENTS RETURNRemove all of the other READ EVENTS you have everywhere else!!!
LOCAL cFileName, oForm IF this.Parent.lstFiles.ListIndex > 0 cFilename = thisform.aFiles[thisform.lstFiles.ListIndex, 2] IF FILE(cFileName) oForm = CREATEOBJECT('PdfViewer') oForm.DisplayPdf(cFileName) oForm.Visible = .T. oForm.Show(1) && Make it modal ENDIF ENDIFNow in the OdfViewer form provide a Quit or Exit button that does;
Thisform.Release()And in you PdfPicker form also provide a Quit or Exit button that does;
Thisform.Release()In the Unload event of the PdfPicker form put;
CLEAR EVENTSThat should make your forms work togehter well the way you want them to.