With NewObject() you must also specify the class library, it doesn't check what you have already specified. IOW, this is the correct syntax:
_screen.NewObject('ThemesManager', 'ThemesManager', ;
'd:\vfpx\themedcontrols\vcx\themedcontrols.vcx', '', .T.)
This may seem odd, but it makes you specify exactly where the class is should be taken from. Especially if you have different classes with the same name but in different class libraries, CreateObject() may easily pick the wrong one. That's one of the reasons why I use NewObject() most of the time.
>Hi there,
>
>I am trying to use the themed controls from vfpx but do not get it workung. I downloaded the samples from vfpx
>and also the samples from Doug Hennig. Both react the same way. If I open them in the IDE, they do not work properly (Files missing), if I open them by double-clicking in the windows-explorer they work. What is the difference?
>
>In my first attemot I tried to ini the themesmanager and did this:
>
>
>SET CLASSLIB TO d:\vfpx\themedcontrols\vcx\themedcontrols.vcx addi
>
>
>later I tried the init-code from Doug Hennigs example
>
>
>_screen.NewObject('ThemesManager', 'ThemesManager', ;
> 'ThemedControls.vcx', '', .T.)
>
>
>this fails and I get an errormessage that the vcx is not found (VFP searches it in his home-dir and not in the dir specified above=
>
>But when I try the following to test if the set classlib command is correct
>
>
>ot = createobject("themesmanager")
>
>
>this works.
>
>Has anybody some advice for me?
>
>Thanks in advance
>
>Thomas