Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Focus Issues
Message
From
07/08/2009 11:41:29
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Miscellaneous
Thread ID:
01415582
Message ID:
01416764
Views:
53
Well, I thought that would do the trick, but it didn't. I had to resort to making the control Visible and Not Visible, the tricky part is the form Deactivate event fires multiple time becuase focus is moving to the ActiveX control. Finally got it working...... a little bit better, not correctly. I also had to resort to native D&D instead of OLED&D, this could be done is certain parts of the application but not all, so unfortunately the problem is there, I only could try and minimize the issue.

I also took a look at VFP SP2 because it said there was somthing about OLED&D that was fixed, but that didn't help either.

Thanks for the suggestion.

Scott

>Hi Scott,
>
>> I have form A that contains an ActiveX control (LeadTools v9, old, I know)
>
>You could disable the control in the Deactivate event of form A and activate it in the Activate event:
>
>Declare Long GetParent in Win32API Long
>Declare Long EnableWindow in Win32API Long, Long
>
>* Disable
>EnableWindow( GetParent(oleControl.Hwnd), 0 )
>
>* Enable
>EnableWindow( GetParent(oleControl.Hwnd), 1 )
>
>This could prevent it from responding to OLE drag and drop messages.
Previous
Reply
Map
View

Click here to load this message in the networking platform