Plugins

  • Thread starter Thread starter Tomas Andersson
  • Start date Start date
T

Tomas Andersson

Does anyone have a good guide to build plugins for vb .net forms
applications.
Specificly if there is a way to have a menu in the form and add items to the
menu from the plugins that loads.
the plugin should also have some functions accessed by the menu items

Any info would be good
 
I do not see anny problems in doing that ,as you can create menu items in
runtime
so you could initiate your plugin with the help of a interface and
reflection , in this interface you should create a generic mechanism that
builts the
menu item for the plugin , a event would in my opinion be the best solution
but you could also do it with a method or property to be called by the
callee

To invoke the at compile time of the invoker unknown methods ( the methods
that are going to be invoked in the plugin by selecting the menu items that
ere dynamicly generated by the event ) i use CallByname
http://msdn.microsoft.com/en-us/library/chsc1tx6(VS.80).aspx

In C# i would not have anny idea how to do this in a simular easy way :-)
( without setting a refernce to the Microsoft.VisualBasic.dll )

regards

Michel Posseth
 
Examples?


Michel Posseth said:
I do not see anny problems in doing that ,as you can create menu items in
runtime
so you could initiate your plugin with the help of a interface and
reflection , in this interface you should create a generic mechanism that
builts the
menu item for the plugin , a event would in my opinion be the best
solution but you could also do it with a method or property to be called
by the callee

To invoke the at compile time of the invoker unknown methods ( the
methods that are going to be invoked in the plugin by selecting the menu
items that ere dynamicly generated by the event ) i use CallByname
http://msdn.microsoft.com/en-us/library/chsc1tx6(VS.80).aspx

In C# i would not have anny idea how to do this in a simular easy way :-)
( without setting a refernce to the Microsoft.VisualBasic.dll )

regards

Michel Posseth
 
Hello Patrice

ofcourse you could also use an interface if you want to limit the menu to be
only able to call methods that are known before release
with callbyname you can make it "late bound" thus adding new ideas to the
plugin and invoke the methods from the caller without having to know this
for sure you need at least one generic bassic interface but the rest would
then be verry flexible

regards

Michel
 
Tomas Andersson said:
Does anyone have a good guide to build plugins for vb .net forms
applications.
Specificly if there is a way to have a menu in the form and add items to
the menu from the plugins that loads.
the plugin should also have some functions accessed by the menu items

..NET 3.5: 'System.Addin':

CLR Add-In Team Blog
<URL:http://blogs.msdn.com/clraddins/>
 
have a look at the codeproject

http://www.codeproject.com/info/search.aspx?artkw=plugins

you'll find your way

Michel Posseth said:
Hello Patrice

ofcourse you could also use an interface if you want to limit the menu to
be only able to call methods that are known before release
with callbyname you can make it "late bound" thus adding new ideas to the
plugin and invoke the methods from the caller without having to know this
for sure you need at least one generic bassic interface but the rest would
then be verry flexible

regards

Michel



Patrice said:
if 2.0, .NET now provides an addin infrastructure. Try
http://msdn.microsoft.com/en-us/magazine/cc163476.aspx

Else rather than using call by name you could use an interface that has
to be implemented by the plugin...

--
Patrice


Tomas Andersson said:
Examples?


"Michel Posseth [MCP]" <[email protected]> skrev i meddelandet
I do not see anny problems in doing that ,as you can create menu items
in runtime
so you could initiate your plugin with the help of a interface and
reflection , in this interface you should create a generic mechanism
that builts the
menu item for the plugin , a event would in my opinion be the best
solution but you could also do it with a method or property to be
called by the callee

To invoke the at compile time of the invoker unknown methods ( the
methods that are going to be invoked in the plugin by selecting the
menu items that ere dynamicly generated by the event ) i use CallByname
http://msdn.microsoft.com/en-us/library/chsc1tx6(VS.80).aspx

In C# i would not have anny idea how to do this in a simular easy way
:-) ( without setting a refernce to the Microsoft.VisualBasic.dll )

regards

Michel Posseth



"Tomas Andersson" <[email protected]> schreef in bericht
Does anyone have a good guide to build plugins for vb .net forms
applications.
Specificly if there is a way to have a menu in the form and add items
to the menu from the plugins that loads.
the plugin should also have some functions accessed by the menu items

Any info would be good
 
Back
Top