Solved

Help Menu Creation

Posted on 1998-07-28
3
143 Views
Last Modified: 2010-05-03
I developed an application, along with an "owner's manual", which exists as a plain text readme file (written with Notepad). At this time, that readme is packed along with everything else needed, by the setup wizard. It is suggested that I also make that document available from the running application, under a menu "Help". I'm not sure how to do that. I created the appropriate menu, and there is the associated click procedure in the source code, empty at this time.  I expected to find something like a "help editor". Inside the click procedure, should I write code that invokes Notepad, and loads it with my readme?  What does that code look like?  Is there a better way? The books I have don't say much about this matter. Can you recommend a book that covers this topic well? - Thank you - Norm
0
Comment
Question by:normpos
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
shchuka earned 100 total points
ID: 1467002
I recommend using ShellExecute() API function from shell32.dll (I assume you're using a 32-bit version).  You'd have something like this.

REM in the declaration section of the form
private declare function ShellExecute& alias "ShellExecuteA" (byval hwnd&,
       byval lpOperation$, byval lpFile$, byval lpParameters$, byval lpDirectory,
       byval nShowCmd&)
private const SW_SHOW as long = 5

REM in your menu_click subroutine
dim filename as string
dim directory as string

filename = app.path
if right$(filename,1)<>"\" filename = filename & "\"
filename = filename & "manual.txt"
directory = app.path
ShellExecute(thisform.hwnd,"Open",filename,"",directory,SW_SHOW)


This will check what program in windows is associated with the text files and open that program with your text file in it.

Another solution will be to simply open the file, read everything into a string variable, and then set the text property of some textbox to that string variable (you'll need obviously) a separate form or something for that.

0
 

Author Comment

by:normpos
ID: 1467003
shchuka: Thank you. I'll try your code and get back to you.  Yes, I'm using VB5.  Should have mentioned that in my original question.  What is "REM" in your code?  Remark?

Comment: "Standard" help in various applications appear to be organized into topics, and there are links within the help text to hop about from topic to topic.  Coming in cold, I had expected there would be something like a "help editor" for construction of the help contents.  In the past, I did some HTML coding once, which included links to various parts within a (very long) displayed document.  I was expecting to find some similar construct in this context.  Guess not. -- Norm
0
 

Author Comment

by:normpos
ID: 1467004
shchuka: By a wild coincedence, I ran into somebody carrying a third-party package specifically designed to build the contents of the menu "help".  This one costs $400 !! There are probably others around.  Know anything about this? - Norm
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now