Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLETreeView keeps calling Activate
Message
 
To
17/05/1999 14:58:50
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00219737
Message ID:
00219871
Views:
15
Bill,
I don't know anything about the Sheridan ActiveX control, but I have a couple of suggestions.

1) is frmCustomer modal? That would tend to keep it on top.

2) if frmCustomer is NOT modal, then you should have no code in the method that calls frmCustomer. Any code after 'do form frmCustomer....' will continue to run, and that may be causing the call to Activate().

HTH
Barbara

>I have a form (frmExplorer) which contains the Sheridan ActiveTreeView control, named OLETreeView. In the OLETreeView.MouseDown() method, I am checking for the right click, and if so, another form related to the current node is called. Once the form is called [frmCustomer.Show()], I am setting various properties and calling various methods on the form. All the while, frmCustomer is the front-most form, exactly the way I want it.
>
>However, once the code in the OLETreeView control completes, the frmExplorer.Activate method is being called. This brings the frmExplorer to the front, covering up frmCustomer. For obvious reasons, this is very frustrating to the user, who wanted to view or edit information on frmCustomer.
>
>I just tried it again, this time doing a left click (normal click), and the same thing: when the MouseDown code was done, the frmExplorer.Activate method was called.
>
>There is no code in the form's activate, and nowhere in either frmExplorer or OLETreeView is the frmExplorer.Activate method being called. Since the OLETreeView control is an OCX, not a VCX created in Visual FoxPro, I cannot check to see if there is any code in the class which calls THIS.Parent.Activate or THISFORM.Activate.
>
>Is this sort of behavior the default behavior for OLE objects, or is it unique to the treeview control? In either case, is there any way to preempt this default behavior, or at least capture it so I can decide when to call the Activate and when to skip it?
>
>Bill
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform