Mega Search
23.2 Million


Sign Up

Make a donation  
OnHelp and OnActiveControlChange  
News Group: embarcadero.public.delphi.vcl.components.using

Hello

I am getting incompatible type 'NativeInt' and 'Integer' for:

Application.OnHelp := FormHelp;

This worked in Delphi 2009.

I am also trying to detect LastActiveControl. I set Screen.OnActiveControlChange := ChangeControl;

But this gives me an incompatible type - parameter lists differ - error

Thanks
Tom Obenschain

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 1-Jan-2015, at 1:32 PM EST
From: Tom Obenschain
 
Re: OnHelp and OnActiveControlChange  
News Group: embarcadero.public.delphi.vcl.components.using
Thanks

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 1-Jan-2015, at 4:49 PM EST
From: Tom Obenschain
 
Re: OnHelp and OnActiveControlChange  
News Group: embarcadero.public.delphi.vcl.components.using
> {quote:title=Tom Obenschain wrote:}{quote}
> Hello
> 
> I am getting incompatible type 'NativeInt' and 'Integer' for:
> 
> Application.OnHelp := FormHelp;
> 
> This worked in Delphi 2009.

So what are you using now ....


my guess is that in XE7 (or what ever you are using)

Application.OnHelp  expects =>function (Command: Word; Data: NativeInt; var CallHelp: Boolean): Boolean;

and your existing is
function MyForm.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;

Ie not the same ... fix you Formhelp function - Data: NativeInt-  and all will be fine


> 
> I am also trying to detect LastActiveControl. I set Screen.OnActiveControlChange := ChangeControl;
> 
> But this gives me an incompatible type - parameter lists differ - error

Same problem
recreate you header for ChangeControl

> 
> Thanks
> Tom Obenschain


--
Linden
"Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 1-Jan-2015, at 3:35 PM EST
From: Linden ROTH