Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


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


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

Author
Message
Matt
Matt
Forum God
Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)

Group: Forum Members
Posts: 17, Visits: 23

Is there a way to have the ability to call a dll and pass to it arguments of type form, combo box , etc.

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


GO



Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search