DEFINE CLASS MyVFPClass AS SESSION OLEPUBLIC PROCEDURE Go() *** Lengtly process goes here. d = DATETIME() c = d DO WHILE DATETIME() - d < 10 IF c != DATETIME() IF (DATETIME() - d) % 2 = 0 *** Event Called Here THIS.Progress() ENDIF c = DATETIME() ENDIF ENDDO ENDPROC PROCEDURE Progress() *** I want this to trigger an event in C# ENDPROC ENDDEFINE
// C# Background worker thread. public class cVFPSession { public cVFPSession() { MyVFPClass _VFP = new MyVFPdll.MyVFPClass(); MyVFPClass.Progress += Progress(); MyVFPClass.Go() } public void Progress() { // Report Progress using Background worker .ReportProgress; } }Note: My other option is to create this as an EXE and use some form of inter process comunication. Might that be a better solution?