Skip to Content
author's profile photo Former Member
Former Member

How to shut down my addon exe?

How to shut down my addon exe?

Hi all,

To keep my exe running, I am using the sample codes below

Do While GetMessage(Msg, 0&, 0&, 0&)

TranslateMessage Msg

DispatchMessage Msg

DoEvents

Loop

How can I shut down my addon exe when SAP Business One is shut down?

I tried to set SBO_APPLICATION to nothing as below, but the Exe is still running and you can find it in Task Manager

Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes)

If EventType = aet_ShutDown Then

'SBO_Application.MessageBox "A Shut Down Event has been caught" _

' & vbNewLine & "Terminating Add On..."

'//**************************************************************

'//

'// Take care of terminating your AddOn application

'//

'//**************************************************************

Set SBO_Application = Nothing

Set SBO_Comany = Nothing

End

End If

End Sub

Can anybody give me a solution?

Thanks in advance.

By the way, I am using SBO 7.0 and SDK 6.2

Wennie

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2004 at 06:34 AM

    In Microsoft VB.net you could use this command:

    Application.ApplicationExit

    HTH Lutz Morrien

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 27, 2004 at 03:49 AM

    Problem solved, using the codes below

    If EventType = aet_ShutDown Then

    End

    End If

    Thank all of you.

    Add comment
    10|10000 characters needed characters exceeded