Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active X event not work in VFP

Status
Not open for further replies.

FranklinYeung

Programmer
Apr 20, 2001
31
0
0
HK
Hi all,

I have created an active x control "panel.ocx" by VB6.
This active x is used to detect a hardware panel, when user click different button (e.g. "Start", "Stop", "Skip"), different event will be driven. A simple VB6 program with this active x prove me both hardware & software works.

What i want is to add this control in a VFP6's form in order to detect the event(s) so that i can display different message on the form according to which button pressed by user. However, there are no any event occured for all case.

I am sure I registered the active X by :
regsvr32 panel.ocx

Can i add the active x control on VFP's form directly so that event can be occured just like in VB6? Why VB6 and VFP6 return such different response (event occured in VB6 but not in VFP). What i missed in VFP?

Thank you for any help / reminder.

^_^
Franklin
 
A VFP application can only respond to events it knows about directly. If you want it to respond to "external" events, you'll need to use the VFPCOM Utility. A recent update, good for VFP 5.0-> VFP 7.0, can be found on the MS web site - You should at least install it and read the documentation to understand the possibilities.

Rick
 
Hi Rick,

Do u mean i need to rewrite the active x to com object and use the blindevent method to handle the event?

Many thanks!


Franklin
 
I hope you're aware that there are various "panel*.*" files already on your computer. Therefore you have to be careful how you address the panel.ocx you've registered. If you're still having problems you might want to try it using a different name and see if it helps.
Dave Dardinger
 
Is it possible to delete the outdate active x object class ID (CLSID) from registry and re-register again?

Many Thanks!

:)
Franklin
 
Sure. Have you ever used Regedit? I believe there are a couple of versions available depending on your OS. I have both a regedit.exe and a regedt32.exe which have different looks and feels but can both let you do much the same things. But you need to know what you're doing or you can totally trash your system. Whatever you do make a copy of the registry (renaming it as you go.) Actually at least in regedit.exe you can export it and you should do that first before your start deleting things. Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top