cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove my menu and other resources after uninstall in my plugins

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

i catch event of stop button of Addon installer

then i write code to remove menus

but there is message of failed instead of disconnected

but menu get removed

Former Member
0 Kudos

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.

Former Member
0 Kudos

Thank very much

Answers (0)