Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

who is calling the DLL

Status
Not open for further replies.

koukouroukou

Programmer
Feb 6, 2002
38
GR
How can i make a reference of the form that is calling the DLL and make the DLL know the controls of the form
Please help me
 
Not sure that I understand your question. To make a reference to your .dll, just reference it the same you would reference other .dll files in your VB application. (Click on Project, References and then choose from there.) What do you mean about making the .dll file know the controls of the form? (Not sure that I can help, but worth a shot.) Give me liberty, or give me pizza...
 
I have the referenced dll in my Project. here my steps and my question
1 call the dll from Form1
2 call a form within the dll Dll_form
3 trasfer data from form1 to DLL public variables
4 i use the dll_form for connection to sql and all my other functions

So far all OK my problem now:
5 on Dll_form unload i want to activate an active x control on Form1 but my dll_form ignores the existance of Form1

thanks on advance
 
Hello.
Try to add an event into Form1 and on unloading dll_form raise that event: Form1 than catch the event and so you can also unreference DLL and set focus to Form1.
Andrej
 
how can i use this. I have never raised an event before, Can you give me an example?
Thanks on advance
 
in your component declare an event as follows

PUBLIC EVENT Blah

then where you want to fire back the event to the calling app code this

RAISEEVENT blah

on your client app just declare the object on a form at the module/form level as

PRIVATE WITHEVENTS myObj AS cObjectBlah

then it will appear in the objects combo box like a normal control and you will see any events in the events combo box.

But I'm still confused what you are doing.
Are you trying to get the DLL to use a connection object that your form has already created? If so why not just pass up the reference to the connection?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top