TAppEventsOnHint (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example requires that a TApplicationEvents and a TListBox are on the form. Select the TApplicationEvents, double-click the OnHint event and the OnShowHint event, and add the following code to the handlers. OnHint is triggered when the mouse passes over the control. OnShowHint is triggered when the mouse passes over the control and the application is about to display the hint window for a Help Hint.

Code

void __fastcall TAppEventForm::ApplicationEventsHint(TObject *Sender)
{
    lbOther->Items->Add("Event OnHint");
}
void __fastcall TAppEventForm::ApplicationEventsShowHint(UnicodeString &HintStr, bool &CanShow,
		  THintInfo &HintInfo)
{
	lbOther->Items->Add("Event OnShowHint");
}

Uses