I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Wicked...   Print This     
  From the December 2009 Issue of Prestwood eMag
 
Paradox OPAL: Wicked Coding Tasks:
Add an Option to Paradox's Tool's Menu
 
Posted 11 years ago on 6/10/2008
Take Away: How to add an option to the tools menu.

KB101176



The following code is from Workbench for Paradox and it adds Workbench as a menu option to the Tools menu. For clarity, I simplified the routine a bit. When I have time I'll come back and add comments. In the meantime, if you have questions, contact me.

;Copyright (C) 1998 Mike Prestwood
;OK to use and modify this code 
;but do not post to any public location.
;You can post links back to this article: 
;http://www.prestwood.com/ASPSuite/KB/document_view.asp?qid=101176
method cmAddToTools()
 var
   sRead    String ;From Registry.
      sFirstTime  String
   sGet    String ;From getFileName.
 endVar
 try
    sFirstTime = getRegistryValue(kKeyWorkbench, "FirstTime", regKeyCurrentUser)
 onFail
    sFirstTime = "No"
 endTry
 try
   sRead = getRegistryValue(kKeyTools, "&Workbench", regKeyCurrentUser)
 onFail
   sRead = ""
endTry
 sGet = getFileName()
 if (sRead <> sGet or sFirstTime = "Yes") then
    cmStartupClose()
   setRegistryValue(kKeyWorkbench, "FirstTime", "No", regKeyCurrentUser)
   f.openAsDialog(sWBPath + "Dialogs\\Welcome")
    f.wait()
 endIf
 if sRead <> sGet then
   setRegistryValue(kKeyTools, "&Workbench", sGet, regKeyCurrentUser)
   setRegistryValue(kKeyWorkbench, "WorkbenchPath", sGet, regKeyCurrentUser)
   msgInfo("Installation Note", sGet + "\n\nWorkbench installed (or reinstalled) to your Tools menu.
                        The next time you run Paradox, select Tools | Workbench to open Workbench.")
 endIf
endmethod


Manually Adding Menu Item's to Paradox

You can use the code above to add menu items to Paradox or manually by altering the registry.

HKEY_CURRENT_USER\SOFTWARE\COREL\PARADOX\9.0\PXDLITE

You can add menu commands to the following menus:

  • File
  • Tools
  • Help
  • File | Open (Use "Open" key name.)
  • File | New (Use "New" key name.)

Inside a key, you place values corresponding to the menu command you want to add. To add a keyboard shortcut, precede the letter with an ampsersand. Precede the menu's value with an integer value (starting with 0) followed by a comma to specify a particular order for your menu item. The filename can be any Paradox form or script (delivered or not) as well as a program file (.EXE, .COM, .BAT, and .PIF), or .DLL. All other filenames are ignored.


Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1196A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101176 Counter
7861
Since 6/10/2008
-
   Contact Us!
 
PrestwoodBoards.com was developed and is maintainted by me. Do you have a question or suggestion? Do you see a problem? Contact me now. My goal is to build an ad-free and spam-free source of I.T. information with many contributers (ok to promote your website/company in your bio). Yes, my company Prestwood IT Solutions is mentioned in my bio which shows with every post, but you can contribute and promote your pet project too!

2,979 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech