unit1.pas(37,21) Error: Incompatible types: got "untyped" expected "<procedure variable type of procedure(TObject;PHintInfo) of object;Register>
MyButton.OnShowHint := CheckForHint(MyButton);
Besides what wp said, there are two other problems; the first is that the signature of your procedure doesn't reflect the one of the event. Note that the event is declared as a TControlShowHintEvent, which is:so your procedure should be:
type TControlShowHintEvent = procedure( Sender: TObject; HintInfo: PHintInfo) of object;
procedure CheckForHint(Sender:TObject; HintInfo: PHintInfo);
The second is that it's declared "of object", so to be compatible your procedure should be an object's method, for example:of course, with the corresponding declaration inside the form's class, in the interface section.
procedure TForm1.CheckForHint(Sender:TObject; HintInfo: PHintInfo);
That's basically it. HTH!