by Mike.Sheen » Wed Jun 12, 2019 2:57 pm
pricerc wrote:If you're only getting a problem with the scheduler, then as a workaround, you can just wrap it in a try/catch bock that ignores the error.
Why not just check if MDIParentForm is null / Nothing before trying to add the handler? In context outside of Jiwa.exe, the MDIParentForm property of the Manager class will be null as this is the host MDI Parent form of the application.
- Code: Select all
Public Sub Setup(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaApplicationManagerPlugin.Setup
If Plugin.Manager.MDIParentForm IsNot Nothing Then
AddHandler Plugin.Manager.MDIParentForm.Load, addressOf MainForm_Load
End If
End Sub
Mike Sheen
Chief Software Engineer
Jiwa Financials
If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution