procedure TMainForm.FormKeyUp(Sender: TObject; var Key: Word;<br> Shift: TShiftState);<br>begin<br>if key=vk_F1 then<br> HelpMenuItem.onclick(self);<br>end;<br><br><br>procedure TMainForm.HelpMenuItemClick(Sender: TObject);<br>begin<br>if fileExists(ExtractFilePath(Application.ExeName)+'你的.chm') then<br> ShellExecute(0,<br> nil,<br> pchar(ExtractFilePath(Application.ExeName)+你的.chm'),<br> nil,<br> nil,<br> SW_SHOWNORMAL)<br> else MessageDlg('帮助文件找不到!',mtWarning,[mbok],0);<br>end;