on 01-02-2017 1:45 PM - last edited on 02-03-2024 7:32 PM by postmig_api_4
Hi experts,
I have a problem with ItemEvent,
When i click menu item and create form Item event is running once,
Then i close and re-open the form item event is running twice and then three,four times..
How can i solve this problem?
Thank you for helps,
Regards.
Hi Edy,
I am sorry,
Its here,
Regards.
public SalesOrder()
{
SBO_Application = Application.SBO_Application;
SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ahmet,
As Edy said, probably your code is executed multiple times. I believe this code above is executed everytime when you open your form. If yes, you need detach your event when your form close, like this:
SBO_Application = Application.SBO_Application;
SBO_Application.ItemEvent -= new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent);
But if you have two forms opened at the same time, you will receive this event twice. Then you need to manage for each form only control your own events.
Kind Regards,
Diego Lother
Hi Ahmet,
Not this part,
Somewhere there should be a code that is similar to :
SBO_Application.ItemEvent += SBO_Application_ItemEvent(....);
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ahmet,
Your event handler is registered multiple times.
Please show your code where you add the event handlers.
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.