Discussion:
"Class is not licensed for use"
(too old to reply)
Paul
2005-07-18 01:16:32 UTC
Permalink
This seems a never ending saga. Works for 10 fails on 1.
Vfp 6SP5 Windows Server2003

MSComctl.ocx has the "ProgressBar control" registered as
"MSComCtlLib.ProgCtrl.2" I want to use the progress bar on a form.
The control is in the windows\system32 directory
I have registered the control with "regsvr32
c:\windows\system32\mscomctl.ocx" registration completed successfully

I am using the control as follows (some code removed for clarity):

Define CLASS trackevent AS form
Procedure Init
This.AddObject('statusindicator', 'barometer')
WITH This.statusindicator
.Top = 62
.Left = 6
.Height = 16
.Width = 364
.Visible = .T.
ENDWITH
endproc

Enddefine

* Required to by-pass the "class is not registered for use" error
DEFINE CLASS barometer AS OleControl
OleClass = "MSComctlLib.ProgCtrl.2"
enddefine

I get the "Class is not licensed for use" when I attempt to add the control
to the form. I have checked in the registry and the control is properly
registered. I have not had this problem before on any other machine.

Help is appreciated.
Eric den Doop
2005-07-18 07:01:13 UTC
Permalink
Check http://fox.wikis.com/wc.dll?Wiki~ClassNotLicensedForUse~VFP
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
Paul
2005-07-18 22:26:37 UTC
Permalink
Thanks for the link.
It is this sort of irrational behaviour that makes doing even the most
mundane tasks really difficult. The first suggestion was to put it on a
form, but I really needed to have the form coded. The second is to subclass
the control and then use the subclass, which is the method I used.
Don't get me wrong I certainly appreciate your help, it just frustrates me
that we are supposed to be able to use the technology to build systems but
the technology keeps letting us down. It means you are constantly going back
over code and writing work-arounds.
So in this case I re-coded the form to use 2 foxpro shape controls to mimick
the progress bar.
Post by Eric den Doop
Check http://fox.wikis.com/wc.dll?Wiki~ClassNotLicensedForUse~VFP
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
Loading...