Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting Modal Form from ActiveX-Method
Message
From
18/10/1997 13:18:10
 
 
To
18/10/1997 12:30:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055284
Message ID:
00055287
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform