Markus Egger just had a tip in FoxPro Advisor on this. The problem is in the event model of VFP. An internal flag is set whenever a OLE event occurs. ALL other events are ignored until the first is over. Markus suggest a timer class to circumvent the problem. I hope it's ok to reproduce here.
DEFINE CLASS cCommandTimer AS timer
Enabled=.F.
Interval=1
Name='cCommandTimer'
cCommand=SPACE(0)
PROCEDURE DoCommand
LPARAMETERS lcCommand
THIS.cCommand=lcCommand
THIS.Enabled=.T.
RETURN
ENDPROC
PROCEDURE Timer
THIS.Enabled=.F.
LOCAL lcCommand
lcCommand=THIS.cCommand
&lcCommand
RETURN .T.
ENDPROC
ENDDEFINE
The DO FORM
is fired 'late' by the TIMER.DoCommand 'DO FORM
This discusion in his tip article is more complete.
Thanks Makus - I had just run into this puzzling problem:))))
HTH
>Look in Help/doc at AutoYield and DoEvents.
>
>Vlad
>
>>Did anyone already try to open a modal Form from a method within an OLE-Container containing an ActiveX-Control.
>>
>>I have such a constellation. A DO FORM command is issued from a method like CLICK or RIGHTCLICK. The method in question fires from within an ActiveX-Control like LISTVIEW or TREEVIEW. If the thus called Form is modal and that modal form itself contains an other ActiveX-Control like one of the upper ones, those ActiveX-Controls do not react on any event.
>>
>>Suggestions?
Gary
Helping Make Ideas Reality