Update UI of MDI Parent
-
Hi all, I feel pretty much lost, despite (or because of?) of reading tons of material about delegates already. Maybe someone could help me understand a bit more and give me some hints? I have a) an MDI Form which serves as a plugin host (implements IPluginHost from b) b) a plugin interface (defining "IPlugin" with an event named UIUpdate, "IPluginHost" and a delegate "UIUpdateDelegate") c) a plugin (referencing IPlugin) The plugin class holds a custom control, which works on a long lasting task in a separate thread. The custom control is not only supposed to report the progress of this task to it's own UI (which works), but to the MDI forms Interface as well. If ok, I want to see the progress bar counting up in both of the forms. In a sample I saw that the plugins long lasting tasks method contained
DirectCast(Me.MdiParent, FrmMain).OnUpdateMe("Loading " & i.ToString, i) <----- not working
Me.OnUpdate("Loading " & i.ToString, i) <----- workingto report the progress to both UIs. This doesn't seem to work with the plugin pattern: The type "FrmMain", having an additional "onUpdateMe" Method, is unknown to the compiler, but replacing it with standard "Form" type doesn't work since this doesn't have the "onUpdateMe" Method. Considering it's a plugin, it would anyway make much more sense to learn how to address the MDI parent form without knowing its type, if that's possible. Before I have to run around in circles for another few days, please help me out of this trap... Thank you in advance Mick