Quite Strange. I am tryting to pass the form from a standard exe to an activex dll.
The reason I am doing this to take the handle of the form being passed to apply a skin to the form and all the controls on it in one go. I have many other vb 6.0 projects so i am trying to create a generic dll so as not to repeat the same code everywhere.
the dll code is written inside a class called 'CommonAPIs'
In the form I create a reference of the above dll and in form load, I call the loadskin method as below:
Private Sub Form_Load()
Dim objAvataar As AvataarCommonAPI.CommonAPI
Set objAvataar = New AvataarCommonAPI.CommonAPI
If I add both the standard exe and the dll project within the same group, it works but if I create a dll and reference it separately, nothing happens (the skin is not applied which it should).
What is the mistake I am doing ??
Shall appreciate a quick reply !!
Public Function Loadskin(frm As Object)
On Error GoTo Err_LoadSkin
Dim frmskin As VB.Form
If TypeOf frm Is VB.Form Then
Set frmskin = frm
frmmain.SkinFramework.Loadskin SKINPATH + "\" + SKINNAME, ""
Err.Raise Err.Number, "LoadSkin", Err.Description