|
-
Feb 12th, 2001, 06:24 AM
#1
Thread Starter
New Member
I have a DLL which contains a Form (frmChild). I have a separate project (Standard EXE) which contains the MDI Form. I would like to load the frmChild into the MDI. Does anyone have any thoughts.
This is what I have so far.
DLL (ChildProj.Interface)
DLL (frmChild)
-------------------------------
Public Sub LoadForm() as Object
Set LoadForm = TransferObject(frmChild)
End Sub
Private Sub TransferObject(ByVal tForm as Form)
Set TransferObject = tForm
End Sub
EXE (MdiProj)
-----------------
Private Sub MDILoad()
Dim Obj as New ChildProj.Interface
Dim frmObj as Form
Set frmObj = Obj.LoadForm
frmObj.Caption = "I Hope This Works"
frmObj.Show '-> This fails, it says that it cannot find
'-> a MDI Form. This makes me think that
'-> the Form Object was passed by REF.
End Sub
-
Feb 12th, 2001, 08:02 AM
#2
Junior Member
Try this
Set frmObj = NEW Obj.LoadForm
Without the NEW syntax you are probably changing the context of the Original MDI Form.
-
Feb 13th, 2001, 01:30 AM
#3
Thread Starter
New Member
Thanks.
I tried it but that did not work either.
I think the problem is that I am returning a Object.
Object does not contain the form(frmChild) but rather a reference to that form.
This is why when I try to load it, it tells me that it can not find a MDI form because it is loading in the DLL.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|