File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1174,6 +1174,7 @@ inherited MainForm: TMainForm
1174
1174
end
1175
1175
end
1176
1176
object appEvents: TApplicationEvents
1177
+ OnHelp = appEventsHelp
1177
1178
OnHint = appEventsHint
1178
1179
Left = 291
1179
1180
Top = 96
Original file line number Diff line number Diff line change @@ -478,6 +478,11 @@ TMainForm = class(THelpAwareForm)
478
478
procedure actViewTestUnitUpdate (Sender: TObject);
479
479
// / <summary>Displays the Welcome page in the details pane.</summary>
480
480
procedure actWelcomeExecute (Sender: TObject);
481
+ // / <summary>Handles events triggered when help system is invoked. Prevents
482
+ // / exception being raised when F1 key is pressed when a menu is dropped
483
+ // / down.</summary>
484
+ function appEventsHelp (Command: Word; Data: Integer;
485
+ var CallHelp: Boolean): Boolean;
481
486
// / <summary>Handles events triggered when a control issues a hint. The
482
487
// / hint is displayed in the form's status bar.</summary>
483
488
procedure appEventsHint (Sender: TObject);
@@ -1215,6 +1220,16 @@ procedure TMainForm.AfterShowForm;
1215
1220
fMainDisplayMgr.ShowWelcomePage;
1216
1221
end ;
1217
1222
1223
+ function TMainForm.appEventsHelp (Command: Word; Data: Integer;
1224
+ var CallHelp: Boolean): Boolean;
1225
+ begin
1226
+ // Prevent Delphi Help system from interfering!
1227
+ // This prevents exception being raised when F1 is pressed over menu items
1228
+ // while still allowing our custom help manager to operate.
1229
+ CallHelp := False;
1230
+ Result := True;
1231
+ end ;
1232
+
1218
1233
procedure TMainForm.appEventsHint (Sender: TObject);
1219
1234
begin
1220
1235
if Assigned(fStatusBarMgr) then
You can’t perform that action at this time.
0 commit comments