Olaf Doschke
Programmer
I have an EXE, that works fine on it's own (for 4 years, extended about 3 times a year, current main work).
I thought I add the feature to enable automating it, like Word or Excel can be automated. I was writing this small ole class for a start:
One important thing to add to main.prg is to NOT execute READ EVENTS in case it's started from the OLE class, as that would not let creation of the OLEAPP class return to the callee. I therefore made READ EVENTS execution depend on _VFP.Startmode<2.
And that makes it work: oYourAPP = CREATEOBJECT("YourApp.OleApp")
So far I can see the _screen of the application started as OLE Server, and it starts normal, gives me a login form and starts menu and toolbar. But if I pick some menu item, nothing happens. I can actually use some menu items, like the login, to relogin as another user. But other forms don't work.
I fear it's a very specific problem you can't solve without further info, but what could cause that?
What, if you do that for one of your applications? Does it work out for you?
Bye, Olaf.
I thought I add the feature to enable automating it, like Word or Excel can be automated. I was writing this small ole class for a start:
Code:
Define Class OleApp As Custom OlePublic
_Screen.Visible = .t.
DO main.prg IN (_vfp.ServerName)
EndDefine
One important thing to add to main.prg is to NOT execute READ EVENTS in case it's started from the OLE class, as that would not let creation of the OLEAPP class return to the callee. I therefore made READ EVENTS execution depend on _VFP.Startmode<2.
And that makes it work: oYourAPP = CREATEOBJECT("YourApp.OleApp")
So far I can see the _screen of the application started as OLE Server, and it starts normal, gives me a login form and starts menu and toolbar. But if I pick some menu item, nothing happens. I can actually use some menu items, like the login, to relogin as another user. But other forms don't work.
I fear it's a very specific problem you can't solve without further info, but what could cause that?
What, if you do that for one of your applications? Does it work out for you?
Bye, Olaf.