|
-
Jul 25th, 2003, 08:46 AM
#1
Thread Starter
Addicted Member
VB.NET Dlls - Passing a form as an argument [Resolved]
Hello,
I've finally decided to begin exploring .NET and have begun
experimenting with a little program with a plug-in style architecture.
I have a plug-in dll which uses an interface dll to pass arguments to
a host exe.
I can pass strings and simple types like that, but say for example I
would like to pass a form (from the plug-in dll) as an argument to the
host exe (which isn't aware of the form class type in the plug-in),
and then manipulate the form from within the host exe?
If anyone has any insight, or links to articles or tutorials, that
would be a great help.
Thanks!
Justin.
Last edited by Justy; Jul 25th, 2003 at 09:27 AM.
-
Jul 25th, 2003, 08:50 AM
#2
Addicted Member
just pass the form object as an argument of type Windows.Forms.Form
-
Jul 25th, 2003, 09:05 AM
#3
just make sure you make the parameter ByRef too.
-
Jul 25th, 2003, 09:13 AM
#4
Thread Starter
Addicted Member
Thanks folks,
I'm getting "Option Strict disallows implicit conversions from System.Windows.Forms.Form to PluginSample.Plugin.Form1"
It's very head scratching learning stuff from scratch again... in VB, you'd have declared the argument as type Form and bobs your uncle!
-
Jul 25th, 2003, 09:16 AM
#5
Addicted Member
Originally posted by Justy
Thanks folks,
I'm getting "Option Strict disallows implicit conversions from System.Windows.Forms.Form to PluginSample.Plugin.Form1"
It's very head scratching learning stuff from scratch again... in VB, you'd have declared the argument as type Form and bobs your uncle!
use CType
yourForm1 = Ctype(yourForm1Arg, PluginSample.Plugin.Form1)
-
Jul 25th, 2003, 09:26 AM
#6
Thread Starter
Addicted Member
Simple as that! It's working now...
Thanks a lot.
-
Jul 25th, 2003, 09:30 AM
#7
Addicted Member
pleasure..
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
|