Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help Menu Creation

Posted on 1998-07-28
3
Medium Priority
?
164 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

824 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