Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting Missing App Help File

0 views
Skip to first unread message

Ralph Freshour

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
The code below is susposed to minimize my app if the .hlp file is not
found, however, the else statement doesn't seem to be firing - I think
it is because when the windows dialog box displays saying no help file
can be found the focus has already switched away from my app - there
must be some std way to allow an app to detect that the hlp file is
missing and let it minimize itself so the user can see the dialog box
informing them of this fact???

Ralph

if Application.HelpContext(10200) then
begin
// mail.hlp file found
Application.Restore;
end
else
begin
// mail.hlp file not found
Application.Minimize;
end;


Chris R. Timmons

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
ra...@primemail.com (Ralph Freshour) wrote in <3963d956.3371368
@news.concentric.net>:

>The code below is susposed to minimize my app if the .hlp file is not
>found, however, the else statement doesn't seem to be firing - I think
>it is because when the windows dialog box displays saying no help file
>can be found the focus has already switched away from my app - there
>must be some std way to allow an app to detect that the hlp file is
>missing and let it minimize itself so the user can see the dialog box
>informing them of this fact???

Ralph,

if FileExists(Application.HelpFile) then
// Do help call here...
else
// Minimize app...

Another point I should mention about Application.Minimize: I've read
several messages on the newsgroups about Delphi 5 handling this method call
differently than previous versions did. Specifically, sometimes in D5 the
app won't minimize. A workaround is to minimize the main form of the
application: MyMainForm.WindowState := wsMinimized.

HTH,

Chris.
---------

Ralph Freshour

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
Thanks Chris - that seemed to work but I had to do this to get the
windows dialog box to appear and *then* get my app minimized:

if FileExists(Application.HelpFile) then
begin


// Do help call here...

Application.HelpContext(10200);
end
else
begin
// Minimize app...
Application.HelpContext(10200);
Application.Minimize;
end;

Ralph

Gilles

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
... which could be simplified:

Application.HelpContext(10200);
if not FileExists(Application.HelpFile) then Application.Minimize;

Ralph Freshour <ra...@primemail.com> wrote in message
news:39646c8a...@news.concentric.net...

0 new messages