on 02-10-2010 4:35 AM
How to remove my menu and other resources l in my plugins after addons stop
Edited by: Rakeshbos on Feb 10, 2010 5:35 AM
Hi,
You need to manually handle it by having a "Remove Menus.xml" and this should be handled in you App_Event.
There are event types in App_Event such as company change, language Change, Shut down & Server Termination.
Having called all these event types, and in these you can call the xml where you remove the menus.
By doing so, your menus will be removed.
Best Regards,
Satish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you addon class stopping, you can execute the removing of the menus.
to remove a menu:
If (SBO_Application.Menus.Exists(IHB_MENU1)) Then SBO_Application.Menus.RemoveEx(IHB_MENU1)
in AppEvent,
Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
'
Try
Select Case EventType
'
Case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged
AddMenuItems() ' Including removing menus.
Case Else ' every another message
If (SBO_Application.Menus.Exists(IHB_MENU1)) Then SBO_Application.Menus.RemoveEx(IHB_MENU1
End
'
End Select
'
Catch ex As Exception
SBO_Application.StatusBar.SetText(String.Format("{0}-{1}", "SBO_Application_AppEvent", ex.Message))
Finally
GC.Collect()
End Try
end sub
Regards
J.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.