Hi
I've got an MDI form with a menustrip that already detects all .dll files in a folder and adds them to the menu to show the user which plugins are available. The thing is that I don't know what to do from here on out...
I'd like to be able to update my program without having to stifle through all my code (it's a very big program) and be able to create basic new features through external DLLs. It's extremely useful for users to make their own features too
Anyway, what a plugin would look like is most likely just a form with controls on it that the user makes themselves in VB. I'd like the plugin to activate through an init() sub within the plugin by clicking on the menu item shown in my MDI form.
I kind of started with my own code but it didn't really get anywhere:
...Where ListFilesInMenuStrip() is my function to add all the DLLs to the menu and App_Path is just a shortcut function which serves the same purpose as VB6's App.Path() class.Code:ListFilesInMenuStrip(PluginsToolStripMenuItem, App_Path() & "Plugins\") For Each c As Control In Me.Controls If TypeOf c Is MenuStrip Then For Each child In c.Controls If TypeOf child Is ToolStripMenuItem Then Dim m As ToolStripMenuItem m = child End If Next End If Next
I've also done research but only came across all their weird complex CodeDom and other weird things...This seems so simple but I just can't wrap my mind around it :I





Reply With Quote