on 02-11-2005 2:25 PM
Hi,
How to set the event handlers with the application object in Delphi2005?
There is no App.OnItemEvent in SAPbouiCOM_TLB.Application, so I don't know how to catch the events.
My bad example:
TForm1 = class(TForm)
App: SAPbouiCOM_TLB.Application;
...
procedure MyItemEvent(const FormUID: WideString; var pVal: IItemEvent; out BubbleEvent: WordBool);
...
end;
...
procedure TForm1.FormActivate(Sender: TObject);
begin
App.<b>OnItemEvent</b>:= MyItemEvent;
end;
...
procedure TForm1.MyItemEvent(const FormUID: WideString; var pVal: IItemEvent; out BubbleEvent: WordBool);
begin
//...
end;
Any idea?
Thanks in Advance
Gabor
Hi,
Try use SAPbouiCOM_TLB.TApplication
I think that should be something like that:
private
...
SBO_App: SAPbouiCOM_TLB.TApplication;
procedure ApplicationMenuEvent (ASender: TObject; var pVal: IMenuEvent;
out BubbleEvent: WordBool);
procedure ApplicationAppEvent(ASender: TObject; EventType: BoAppEventTypes);
procedure ApplicationItemEvent(ASender: TObject; const FormUID: WideString;
var pVal: IItemEvent;
out BubbleEvent: WordBool);
....
procedure TForm1.FormCreate(Sender: TObject);
begin
SBO_App.OnAppEvent := ApplicationAppEvent;
SBO_App.OnItemEvent := ApplicationItemEvent;
SBO_App.OnMenuEvent := ApplicationMenuEvent;
end;
procedure TForm1.ApplicationAppEvent(ASender: TObject;
EventType: BoAppEventTypes);
begin
//-
end;
procedure TForm1.ApplicationItemEvent(ASender: TObject;
const FormUID: WideString; var pVal: IItemEvent;
out BubbleEvent: WordBool);
begin
//-
end;
procedure TForm1.ApplicationMenuEvent(ASender: TObject;
var pVal: IMenuEvent; out BubbleEvent: WordBool);
begin
//-
end;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
-
Message was edited by: Ribeiro Santos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
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.