Always put it beside vbRichClient5.dll for regfree deployment, so this is correct.
No, what's already there inside Sub Main was correct - and ensures that
the vbWidgets.dll can use *other classes from the RC5 regfree internally*.
In your case, you want to create instances of Classes regfree, which vbWidgets.dll
*exports* on its outside interface (all of the cwWidget-Thingys).
And so, this case has to be handled within your App, not in vbWidgets.dll.
I've seen, that you re-create a New_c (along with a Cairo) regfree in each and
every Class in your StdExe-Project. That is *not* necessary.
When New_c and Cairo are defined Public in a *.bas Module, then they are
automatically "visible" and usable in each and every code-snippet in your
entire Project, so they have to be created Regfree only *once* (in Sub Main()).
Now, to create Widget-Classes regfree from within your Std-Exe-Project,
I usually write a small function for that ....(Public, and placed in the same
Code-Module (besides Sub Main()):
The one on GitHub is the one to use, if you have useful enhancements whichCode:Public Function NewWidget(ClassName As String) As Object
If App.Logmode Then 'we run compiled
Set NewWidget = New_c.RegFree.GetInstanceEx(App.Path & "\vbRC5BaseDlls\vbWidgets.dll", ClassName)
Else 'we run in the IDE, so we create the instance from the registered version
Set NewWidget = CreateObject("vbWidgets." & ClassName)
End If
End FUnction
you think should be placed in the Master-Branch there, post them to me,
or make a Git-Pull-Request.
That would be a change you could mail me, so that I can update the GitHub-Repo.
IIRC there should be already a "MoveToFront"-Method in cWidgetBase.
First thing to make it easy should be, to transfer all your Imaging-Algos into a Dll-Project -
wrapping each of the Algos in its own Class (with all its Parameters as Public Properties).
Example for an RGB-Color-Inversion-Algo:
With such a generic usable Dll-Class-definition (which later on would even allow PeopleCode:Option Explicit
'the Properties are free definable, and can be enumerated completely with the RC5.cProperties-Enumerator later on
Public OnRedChannel As Boolean
Public OnGreenChannel As Boolean
Public OnBlueChannel As Boolean
Private Sub Class_Initialize() 'set Default-Values
OnRedChannel = True
OnGreenChannel = True
OnBlueChannel = True
End Sub
'Now, two generic (unchanging) Public Methods, each Class has to implement in the same signature
'one for Pixels, to process in a Surface-Container
Public Sub PerformOnSurface(Src As cCairoSurface, Dst As cCairoSurface)
If OnRedChannel Then 'perform your Inversion Loop on the Red-Bytes of Src
End If
If OnGreenChannel Then ... a.s.o.
End Sub
'and one for your Double-Precision-Arrays
Public Sub PerformOnDoubleArrays(SrcR() As Double, SrcG() As Double, SrcB() As Double)
If OnRedChannel Then 'perform your Loop on SrcR
End If
If OnGreenChannel Then ... a.s.o.
End Sub
'Maybe two additional Properties should be defined in such a default-interface on each of those Classes
Public Property Get SupportsSurfaces() As Boolean
End Property
Public Property Get SupportsDoubleArrays() As Boolean
End Property
to contribute "Plugins"), you should be able to cover most of what you currently have.
I mean, why not "doing it right from the get-go", since you're currently in a re-design-
phase anyways...
Remember, that you can easily load such an "Algo-Class-Definition" from your Dll
regfree later on (quite similar to what you do with vbWidgets.dll-Classes) - and you could
run them in the IDE (whilst developing your surrounding GUI-Project) *native-compiled*
in full-speed (from the compiled Dll).
I know that such "architectural-considerations" are sometimes "hurtful for the creative mind"
(which doesn't want to get bothered with such "unimportant details") ;) - but once you have it
in place, you will thank yourself later on, when the project evolves.
Olaf

