borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (protect cd)Next Topic (Opening a Word document from a VB form) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Calling .dll and Passing to it Arguments of Type Form, Combo box and The Like
Poster Message
matt_1ca
Level: Scholar

Registered: 27-03-2005
Posts: 42

icon Calling .dll and Passing to it Arguments of Type Form, Combo box and The Like

I have a VB exe project which I am trying to split into an exe and dll that works together. I have no problem doing this except that for me some portions of my code which represented convenience in the past has now become a pain in the neck.

I am talking about the error message:

“Compile error:
Private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined types.”

When I separated my class and tried to compile its corresponding .dll I keep getting the error above whenever the arguments I passed are or type combo box , form and the like. When I was working with those classes from the exe project, passing these types in said classes has been really convenient for me and although I know how to work around this problem by changing the said class function so that it does not pass said types – it now has become a pain considering the size of the application and the number of functions affected.

Also, if there is a way to call said types by tricking the compiler somehow, then I could enjoy the freedom of doing what I have described in future projects without doing a lot of internal changes in the functions affected.

I did try to get a book and read about these things before I experimented to avoid this kind of nightmare – but I do not know why they did not seem to mention about this problem.

Thank you so much for all the kind help you can give.

Gratefully,
Matt

11-07-2005 at 02:07 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Calling .dll and Passing to it Arguments of Type Form, Combo box and The Like
Previous Topic (protect cd)Next Topic (Opening a Word document from a VB form) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder