Board index » delphi » Excel Events

Excel Events

Hi,

We have developed an application in Delphi 3 to uses Automation techniques
to talk to and control Excel (both 97 & 2000).  The application responds to
events fired from Excel one of which is the 'SheetBeforeRightClickEvent'
which has a parameter called 'Cancel' which enables you to stop the context
sensitive menu from appearing.

We have upgraded the compiler to Delphi 5&6, and thought Id try out the
OLEServer units and components supplied.  Having trawled through our code
converting it to use these, I have noticed that the cancel parameter no
longer seems to work as required!  Has anyone else noticed this behaviour
and if so is there a reason?

Thanks,

-- Peter.

Peter Davies
Senior Analyst Programmer
Paragon Business Solutions Ltd

 

Re:Excel Events


This was a bug in D5. D6 should have fixed it no? If none works for you, use
my EventSinkImp utility - it should work correctly on the EventSinkImp
generated components.

--
have fun
Binh Ly
http://www.techvanguards.com

Quote
"Peter Davies" <peter.dav...@credit-scoring.co.uk> wrote in message

news:3b4ae3f6_2@dnews...
Quote
> Hi,

> We have developed an application in Delphi 3 to uses Automation techniques
> to talk to and control Excel (both 97 & 2000).  The application responds
to
> events fired from Excel one of which is the 'SheetBeforeRightClickEvent'
> which has a parameter called 'Cancel' which enables you to stop the
context
> sensitive menu from appearing.

> We have upgraded the compiler to Delphi 5&6, and thought Id try out the
> OLEServer units and components supplied.  Having trawled through our code
> converting it to use these, I have noticed that the cancel parameter no
> longer seems to work as required!  Has anyone else noticed this behaviour
> and if so is there a reason?

> Thanks,

> -- Peter.

> Peter Davies
> Senior Analyst Programmer
> Paragon Business Solutions Ltd

Re:Excel Events


Hi,

I think we originally used the EventSinkImp to produce the units that
Delphi3 was using.  When we upgraded to Delphi5 I just carried on using
them.

Having looked at the relevant code in Delphi5 and Delphi6 I can see that
Delphi5 makes no attempt to pass parameters back to the OleServer.  However
while I can see Delphi6 trying to do this it still doesn't work!  I suspect
it is too slow in getting the information back.  Whereas the EventSinkImp
passes the parameters directly to the callee via pointers.  I have hooked
these back up and everything is fine.

Thanks,

-- Peter.

Senior Analyst Programmer
Paragon Business Solutions Ltd

Quote
"Binh Ly" <b...@castle.net> wrote in message news:3b4b81b3$1_2@dnews...
> This was a bug in D5. D6 should have fixed it no? If none works for you,
use
> my EventSinkImp utility - it should work correctly on the EventSinkImp
> generated components.

> --
> have fun
> Binh Ly
> http://www.techvanguards.com

> "Peter Davies" <peter.dav...@credit-scoring.co.uk> wrote in message
> news:3b4ae3f6_2@dnews...
> > Hi,

> > We have developed an application in Delphi 3 to uses Automation
techniques
> > to talk to and control Excel (both 97 & 2000).  The application responds
> to
> > events fired from Excel one of which is the 'SheetBeforeRightClickEvent'
> > which has a parameter called 'Cancel' which enables you to stop the
> context
> > sensitive menu from appearing.

> > We have upgraded the compiler to Delphi 5&6, and thought Id try out the
> > OLEServer units and components supplied.  Having trawled through our
code
> > converting it to use these, I have noticed that the cancel parameter no
> > longer seems to work as required!  Has anyone else noticed this
behaviour
> > and if so is there a reason?

> > Thanks,

> > -- Peter.

> > Peter Davies
> > Senior Analyst Programmer
> > Paragon Business Solutions Ltd

Other Threads