PDA

View Full Version : some paradox 7 questions


temp
10-29-03, 10:03
we have an application that is built using paradox scripts and tables and forms, and I wondered if it was possible to do the following:
turn off the paradox standard menus so that when the product opens, there aren't any of the paradox menus visible at top or bottom - I know that you can do this once you enter the product, but is it possible to put a switch in the shortcut or alter a file that permanently disables this? Right now our current solution is to place a manufactured grey bar over the paradox stuff but this looks like crap under windows xp.

I also wondered if it was possible to run paradox scripts and alter tables without opening up the paradox gui (i.e., in terms of updating things, etc.,) thanks for your input!

Sergey_Pavlov
10-29-03, 14:00
You can hide standart toolbar by using hideToolBar() method. And hide all the rest toolbars permanently by clicking mouse right button on it (also status bar at the bottom of the screen). It is possible to hide main menu of the Paradox by using AddArray() method of Menu type in your form open method. See example for AddArray() in Paradox Help and use empty array value in it.

temp
10-29-03, 15:22
thanks,
I do have another question, this one about licensing issues. Is paradox 7 even supported anymore? i.e., I don't believe they sell new licenses for it, it is not possible to purchase it, what is the legal status of the software at this point, i.e., if I was interested in distributing it as part of a program what are the requirements for Paradox 7 any more?
Thanks much in advance

Sergey_Pavlov
10-30-03, 07:24
It's no problem - distribute your software with Paradox RunTime. You can't develop applications in the RunTime, but you can execute forms, scripts, report, QBE etc... You can get it free (and distribute it free) from Corel ftp site. I am not sure about 7th version, but 9th can be downloaded from ftp://ftp.corel.com/pub/Paradox/paradox9/ (Don't forget service pack for it)

temp
10-30-03, 15:28
sergey,
thanks for the reply! that looks like that might well do the trick. Do you happen to know what the restrictions are, i.e., what you can't do in the runtime environment, that you can do in the full version of paradox?
Thanks very much!

lmckelvy
10-30-03, 15:44
Mostly you cannot enter the design environment or do most of the interactive stuff you can do with the full version (i.e. it will not allow you to open/create db tables interactively or create/run raw queries). You can only really run forms, reports and scripts and not make changes to them. Since the functionality your user needs should be built into the forms and scripts you write, this should not be a problem.

temp
10-30-03, 17:28
is the run time capable of calling/reading paradox libraries? Also, and this runs into a bit more techincal question specifically regarding this application: I'm attempting to run our app using the runtime, but I keep receiving an error message as the app is opening, i.e.,
"unable to open FORMNAME main menu"
I'm not really certain where to start trouble shooting this as there isn't any more information on the message, just wondering if users have encountered something similar (btw, these scripts and tables, and etc., have been made in pdox 4-7).
Thanks much, everyone's been quite helpful
(guess I should specify that I'm trying to use the pdox 10 runtime)

lmckelvy
10-30-03, 17:55
The answer to your question is: Yes, it can access libraries.

Your problem is probably with your call to open the form, and I suspect that an alias is to blame. Without seeing more code I am shooting in the dark, but (depending on how you declare your aliases) if you are not loading the correct idapi file you will only get some default aliases. Therefore a call to form.open(":myAlias:myForm.fdl") would fail. Another possiblilty is that you do not have rights to the folder where the form is located, especially if you are using XP.

If the application is started from a script, let's see the code. :)

temp
10-30-03, 18:21
lmckelvy, thanks for the advice, I actually got it running without a problem using the pdox9 runtime instead of the pdox 10 runtime. I was curious though (forgive me here b/c I am definetly a newb in this), how one sets the netdir files and things of that nature.
thanks much!

lmckelvy
10-31-03, 10:31
The netdir is set using the BDE Administrator (should be in the Borland Folder under Program files) and this setting is then stored in the IDAPI.CFG (or IDAPI32.CFG) file. As long as all PCs are pointed to the same netdir in their IDAPI file then they will all know where it is located.

When you open the BDEAdmin, the IDAPI file being used is shown in the title bar along with its path. Some people (including me) save the IDAPI file to the network and load it using a command-line argument when Paradox is launched. This way everyone is using the same settings and global changes can be made to the overall configuration, public aliases etc ... with a modification of only a single IDAPI file.

temp
11-03-03, 13:43
thanks much for your replies!
lmckelvy, any chance you care to elaborate on your use of a network idapi.cfg file? (this is of significant interest to me). Also, I'm in the process of attempting to identify if going from paradox 7 to 9 will cause portions of our application to break. Without getting into too much detail, are there any inherent changes/bug fixes from 7 - 9 that might cause code that worked in 7 to no longer function in 9 (specifically the runtime environment)? thanks again for all the input!

lmckelvy
11-03-03, 14:39
I don't know of any specific problems moving from 7 to 9, but I know that 10 supposedly fixed some of the printing problems that had been hanging about so you might consider going straight to 10.

About the network IDAPI file. Again, this is how I do it, many people do it other ways. I am in a closed environment where I can control how things get set up and used (about 250 users).

I'm not sure exactly how you want me to elaborate, but here goes:

1. Find a place on the network that every workstation can see. Let's call it M:\IDAPI_dir\ for convenience. It can be the same place you will specify as NETDIR if you like.

2. Make a copy of the IDAPI file you used to create the application and place it in the M:\IDAPI_dir directory.

3. Open the BDE Administrator and choose the 'Open Configuation' menu option to open M:\IDAPI_dir\IDAPI.cfg file (or IDAPI32.cfg). Click the Configuation tab, go to Drivers->Native, click Paradox and change the NETDIR settings to be M:\IDAPI_dir

4. Close the BDE Admin program and you will be prompted to save your changes and asked if you want to use the M:\IDAPI_dir\IDAPI.CFG file as your default configuation. Unless you want your copy of Paradox to use that IDAPI file when it starts tell it 'NO'.

5. Now when you set up each workstation, all you have to do is make a shortcut with a command-line like this (the paths may be different on your box and I went ahead and added the start-up script because that's how I do things):

"C:\Program Files\Corel\Paradox 9 Runtime\Programs\PDXRWN32.exe" -q -o "m:\idapi_dir\idapi.cfg" L:\PDox\MyApplication\Startup.ssl


6. As long as you have a network connection and the workstations have rights to that directory, they will launch runtime using the 'communuity' IDAPI file. They will all be using the same NETDIR, format settings, and aliases.

7. If you have to move the application in the future - or add an alias, you can simply open Paradox using the 'community' IDAPI file, go to your Alias Manager, change your aliases to point to the new location, then say 'Yes' when it asks if you want to save changes to M:\IDAPI_dir\IDAPI.cfg. Then each of the workstations will automatically know about the change.

Hope this helps.

Mac

temp
11-24-03, 18:07
thanks mac,
I'd forgotten about this thread for awhile ;)
I have a few more questions (as it seems that I'm being thrown more and more maintenance stuff on this code that we have).
2 more questions:
a) is it possible to have paradox/paradox work space open to fit the size of the form it is opening? e.g., we have a main fsl that is the primary interface to this program and I was wondering if it would be possible to have paradox open set to the size of that form so that the form isn't floating in the middle of the workspace.
b) in reference to one of my initial questions at the beginning of this thread: is it at all possible to run a paradox script w/o opening up the gui? It would be bloody fantastic if there was some way of doing this - mainly the script would be updating some tables, etc., etc.,

Thanks much!!!

temp
11-24-03, 18:24
nuts, I really just wanted to edit the above post.
I've been reading about the bde local share = true setting,
I'm curious if this is something that might be helpful to us here. Currently, the way things are set up, every user has their own copy of paradox and their bde netdir settings all point to the same pdoxusers.net file, an ini file is used to point all users to the same db directory somewhere on the network. Currently we have local share set to FALSE, just wondering if it is advantageous to have this set to true? thanks much!

lmckelvy
11-24-03, 18:28
Well there's no way I know of to do that, unless the size of your form is the size of the 'normal' (non-maximized) window.

If you do this in the init method of the main form you can customize the look of things:

Var
Ap Application
frm form
EndVar

Ap.SetTitle("My Cool Title")
Ap.maximize() ; optional
frm.attach()
frm.setIcon(":myIconFolderAlias:myIcon.ico")


This will give your outer window the title and icon you want, instead of the Paradox icon and 'Paradox'.

You can run Paradox minimized using the correct command-line argument. Just make sure to call the exit() command at the end of the script. Here is an example of a command line (the -m switch is what does it):

"C:\Program Files\Corel\Paradox 9 Runtime\Programs\PDXRWN32.exe" -m "c:\myScripts\Maint.ssl"

Hope this helps.

temp
11-24-03, 18:35
lmckelvy, thanks much, appreciate your input,
as I really don't know terribly well what I'm doing, would it be possible to have the script close paradox after running. Essentially we have this product that uses paradox, occaisionally we provide updates to things and currently you have to go into the product enter the directory to the update, select the udpate, and then exit the product and enter it again to fully process the update, I'm trying to think of ways that the update can be packaged into a legitimate exe file that the user just needs to double click to run the update.

lmckelvy
11-24-03, 18:35
I understand that Local Share should always be set to TRUE.

Here are some configuration settings that the PDox gurus recommend.

http://www.thedbcommunity.com/interact/tt/ttbdeconfig.htm

lmckelvy
11-24-03, 18:43
Originally posted by temp
lmckelvy, thanks much, appreciate your input,
as I really don't know terribly well what I'm doing, would it be possible to have the script close paradox after running.


Yes, just add in exit() at the end of the script, right above endMethod

Essentially we have this product that uses paradox, occaisionally we provide updates to things and currently you have to go into the product enter the directory to the update, select the udpate, and then exit the product and enter it again to fully process the update, I'm trying to think of ways that the update can be packaged into a legitimate exe file that the user just needs to double click to run the update.

If Paradox (or Runtime) is already installed on the end users pc, then you would simply supply a script and support files that handle the update - unless you have to make registry or other complex changes. The script can contain code to locate the application and stick the files where they belong. The user would double click the SDL file and the windows file associator would automatically launch Paradox and run the script. You could even get a little fancier and make a small form that does what you need, and has a progress bar etc... - something to think about anyway. If you need help let me know.

Mac

temp
11-24-03, 19:03
lmckelvy,
thanks much! I might just take you up on that offer ;)
now you mention that there might be an inhibitor in regard to complex changes, just wondering what problems might occur there, i.e., if an "update" does some pretty substantial db deletes/changeto's/appends/adds/etc., - does that fall into the "complex" arean?
muchas gracias!!!

temp
11-25-03, 09:42
another followup, just curious if it's possible for the sharedmem and memsize bde settings to negatively impact something? i.e., a large portion of our product was designed in pdox 4, 5, and finally 7 and there is very extensize use of tables and indices, etc., and since I have to convince other people of the value of making a change to these settings, I'm just wondering if there is any conceivable way that increasing the memsize and the sharedmemsize settings could negatively impact the performance or function of anything? Thanks much! (btw, we've been running with a memsize of 16 by default, how badly would that have impacted performance?)
thanks much!!

lmckelvy
11-25-03, 10:23
Originally posted by temp
just wondering what problems might occur there, i.e., if an "update" does some pretty substantial db deletes/changeto's/appends/adds/etc., - does that fall into the "complex" arean?
muchas gracias!!!

That would not be considered complex in my opinion, and could be handled by a script - however a form would be better since it will take some time to do all that and you'd probably want to let the user know what's happening.

Mac

lmckelvy
11-25-03, 10:42
Originally posted by temp
another followup, just curious if it's possible for the sharedmem and memsize bde settings to negatively impact something? i.e., a large portion of our product was designed in pdox 4, 5, and finally 7 and there is very extensize use of tables and indices, etc., and since I have to convince other people of the value of making a change to these settings, I'm just wondering if there is any conceivable way that increasing the memsize and the sharedmemsize settings could negatively impact the performance or function of anything? Thanks much! (btw, we've been running with a memsize of 16 by default, how badly would that have impacted performance?)
thanks much!!

Not that I'm aware of - it usually helps. Here is an excellent reference for these settings. The people quoted here are noted Paradox experts.

http://www.thedbcommunity.com/interact/tt/ttbdeconfig.htm

Mac

temp
11-25-03, 12:41
mac, thanks again for all your help,
I'm trying to implement the following:
"
If you do this in the init method of the main form you can customize the look of things:

Var
Ap Application
frm form
EndVar

Ap.SetTitle("My Cool Title")
Ap.maximize() ; optional
frm.attach()
frm.setIcon(":myIconFolderAlias:myIcon.ico")


This will give your outer window the title and icon you want, instead of the Paradox icon and 'Paradox'.
"

but for some reason that doesn't seem to change anything - it did alter the form's icon from the pardox form icon to a windows default icon but did not change the title of anything. I'm doing this in paradox 7 btw, just wondering if you happen to have an idea of where this might go off. thanks!

lmckelvy
11-25-03, 12:47
Hmmm. I never used version 7, I went straight to 8 and then on to 9. It works on those two versions. Have you checked the OPAL Reference under the Help tab to see if the setTitle() method is there?

temp
11-25-03, 12:57
ok, what I meant to say was, is it possible to change the paradox for windows icon? I know we change the Paradox for Windows to the software name, but I can't seem to get rid of the silly check mark in the same manner as replacing the form icon?
muchas graicas!

temp
11-25-03, 13:20
thanks, figured it out,
a, the alias was wrong, and b for most recent q, one uses ap.setIcon to change the paradox check mark icon. Thanks much!!

lmckelvy
11-25-03, 13:25
Add this to the other code. Note that the path to the icon must be hard, no aliases allowed.

Ap.setIcon("m:\\iconpath\\myicon.ico")

This supposes that the setIcon() method works in version 7.


Mac

temp
11-25-03, 13:32
mac,
thanks again, I've found that it does work, however, I'm trying to change the paradox icon from within a script, i.e., the script that initially opens our application. Right now I change the icon at the first form opening, but that leaves a dealy of a second or so where the icon is still the paradox check mark. Does the seticon function work from within a script to affect paradox? (doesn't appear to to me but I very well may be doing something wrong). Thanks much!

lmckelvy
11-25-03, 14:08
Originally posted by temp
mac,
thanks again, I've found that it does work, however, I'm trying to change the paradox icon from within a script, i.e., the script that initially opens our application. Right now I change the icon at the first form opening, but that leaves a dealy of a second or so where the icon is still the paradox check mark. Does the seticon function work from within a script to affect paradox? (doesn't appear to to me but I very well may be doing something wrong). Thanks much!


It does work in a script, but you still get a flicker.

You might do something with the -m switch in your command line. In other words, start Paradox minimized, then have your script look like this:


var
frm form
Ap Application

endvar
;
;
Ap.setTitle("My Cool App")
Ap.setIcon("m:\\myIcons\\cool.ico")
frm.open("myForm")
frm.maximize()
Ap.maximize()


Mac

temp
11-25-03, 15:50
thanks! I'll give that a go, since you are quite a font of knowledge on the subject, I've got yet another question ;)
I've got a speedbar - a custom speedbar/toolbar, unfortunately at very high screen resolutions, the form/speedbar does not extend the full length of the paradox work space, is there some pdox code around to auto resize something when the resolution is changed/the app size changes? Thanks much!

temp
11-25-03, 15:59
and yet again, the lack of an edit button is hurting me :)
is it possible to have a from centered in the pdox workspace? e.g., if paradox is resized the form is centerd on the new size instead of having to scroll to view it?
thanks again!


---mac, those edit buttons weren't appearing in the web browser I was using on my older machine, I see them now (at another pc)----

lmckelvy
11-25-03, 16:22
Okay, first things first. To edit your posts, look at the bottom of the post where it says Edit/Delete Post and click it.

There is a way to resize everything on a form when a form itself is resized. I don't know if it will solve your problem though. Put the following code on the form where indicated:

In the VAR method of the form:


Var
fThisForm Form
nAspRatio Number
endVar


In the Open event of the form:


var
ix,iy,iw,ih LongInt
endVar

if eventInfo.isPreFilter() then
;// This code executes for each object on the form

else
;// This code executes only for the form
fThisForm.attach()
fThisForm.getPosition(ix,iy,iw,ih)
nAspRatio = number(iw)/number(ih)
maximize() ; optional
endIf



In the setFocus event of the form:



if eventInfo.isPreFilter() then
;// This code executes for each object on the form

else
;// This code executes only for the form
MenuAction(MenuPropertiesZoomFitWidth)

endIf


This can sometimes give odd visual results so use it with caution.

Unless I'm mistaken a form is centered by default when opened. Re-centering within a resized main window may be possible but I'm betting it's problematical.

Hope this helps,

Mac

temp
12-02-03, 13:23
just to keep everything in one thread, I have a few more questions:
I'm trying to work with some paradox 7 push button objects and there a few things that I would like to do: make the buttons the same color as their background so that there is no visibile difference until the button is moused over (and then drop a shadow or something like that). Also, if possible, add a "tooltip" so that when the button is moused over there is a pop up or note somewhere that indicates what the button is. Haven't found much to help me here in looking around but wondering if it's possible. Thanks!

lmckelvy
12-02-03, 18:56
You cannot change the button color as far as I have been able to discover. You can set a tool tip on it by right clicking and choosing the object explorer and looking in the Appearance Tab. Set the Tool Tip to true and enter your text. You can also make the button look flat by checking Use Flat Look on the properties dialog box (it will sort of pop up when you mouseover).

An alternative might be to use a box and make it act like a button, using mouseClick for the pushButton event and changing the frame type on a mouseEnter, mouseClick, and mouseExit. The text label might look a little cheesy but the tooltip properties are just like those of a button.

Hope this helps,

Mac

temp
12-03-03, 11:17
mac,
thanks, unfortunately, in paradox 7, there is no appearance tab in the object explorer (unless I am really missing something), I think that the builtin tooltip feature was added in 8 or 9? Also not sure where to find the "flat" display property either (as this is pdox 7 - my attempts to move us to the pdox 9 runtime to distribute where overruled).
Thanks!

lmckelvy
12-03-03, 11:40
Oh well, I never used 7 - but it's there in 8+.

What I used to do for tool tips was to drop a text box nearby the button and set its visible property to False. Then when the button's mouseEnter event is triggered you set the text box's visible property to True. Then on the button's mouseExit event set the text box's visible property to False again. Alternatively, I will sometimes use a 'community' text box at the bottom of the form and set its value (the text it contains) as well as its visible property during the mouseEnter event of any object for which I want tips to appear.

Hope this gives you some ideas,

Mac

temp
12-05-03, 10:28
thanks for the info! I'm also wondering if anyone knows where I can grab the english version of the paradox 7 runtime? I've looked on the corel website and the only thing I see there is the paradox 7 runtime in german. Also, regarding the runtime, is it possible to update the runtime (i.e., we use the updates for paradox 7 in our product and wondering if we can run those updates on the runtime).
Thanks!