I have an app that I've run for 20 years, initially created in FPW 2.6, I've run it in various versions of VFP with success, run it on VFP 9.0 these days. My issue, which I've posted about here before, is that when I return to the base screen (a screen created in FPW 2.6a), I very often get a column or row position error, i.e. the screen bombs after the subsidiary code is exited. I normally run this thing until I hit either of two buttons, the first of which returns me to the Command Window, the second quits VFP.
So, I've tried a few things but the column or row position errors keep happening, so today I decide I'm going to have a go at creating a VFP form for the base for my application. In the FPW version there are over 20 buttons, but alas I only use about a dozen these days so my VFP form that I created tonight has about a dozen buttons, including the two that either exit VFP or exit to the Command Window.
Everything's running fine, I think, except for the FIRST BUTTON, which launches a PRG that lets me setup a browse of a table. That PRG launches another PRG. An FPD type screen created with some @SAYs and @GETs, it has 8 buttons and a 3-selection radio button set. A selection on that generates another set of @SAYs and @GETs with the index on a table having been determined by the previous "screen"'s button selection. IOW, these aren't FPW screens at this point, just basically Foxpro for DOS type screens. Well, these aren't showing up at all using my new VFP form to launch the FIRST BUTTON. I get an immediate browse of the table I'm using, no order set at all, it's going to the bottom of the table. Not only that, there's no way to close the browse window! That browse window is in Form1. Control+W doesn't make the browse close. It's nutty. The code that works fine when launched from a button on my FPW screen so far will not run when the code is launched from the VFP form. I have to use the Task Manager to kill VFP.EXE. One of the other buttons brings up an FPW screen from which I launch browse windows but they behave fine and they are not in Form1, which appears to be the form of the base form. Why the other button's browse is not confined to Form1 I do not know.
I've tried a few things including putting this code in the FIRST BUTTON's click procedure:
THISFORM.HIDE
THISFORM.Release
=CAPSLOCK(.T.)
DO b.prg
ON KEY LABEL LEFTMOUSE
=CAPSLOCK(.F.)
ON KEY LABEL esc
DO FORM djform
THISFORM.SHOW
The other buttons on the VFP form run fine when I merely hide the form, or in some cases don't even bother to hide the form. Hiding didn't help here so I added the RELEASE, but that hasn't helped either. As you see above, I tried releasing and regenerating, I suppose that can't work anyway, because the procedure doesn't exactly exist after the release? Anyway, I'd think that after releasing the form the programmatic sequences started by b.prg would run OK, but they don't at all.
b.prg starts the whole setup for the browse of this table. But the whole thing is haywire, the FPD type info never happens. Any ideas, tips? Thanks!
So, I've tried a few things but the column or row position errors keep happening, so today I decide I'm going to have a go at creating a VFP form for the base for my application. In the FPW version there are over 20 buttons, but alas I only use about a dozen these days so my VFP form that I created tonight has about a dozen buttons, including the two that either exit VFP or exit to the Command Window.
Everything's running fine, I think, except for the FIRST BUTTON, which launches a PRG that lets me setup a browse of a table. That PRG launches another PRG. An FPD type screen created with some @SAYs and @GETs, it has 8 buttons and a 3-selection radio button set. A selection on that generates another set of @SAYs and @GETs with the index on a table having been determined by the previous "screen"'s button selection. IOW, these aren't FPW screens at this point, just basically Foxpro for DOS type screens. Well, these aren't showing up at all using my new VFP form to launch the FIRST BUTTON. I get an immediate browse of the table I'm using, no order set at all, it's going to the bottom of the table. Not only that, there's no way to close the browse window! That browse window is in Form1. Control+W doesn't make the browse close. It's nutty. The code that works fine when launched from a button on my FPW screen so far will not run when the code is launched from the VFP form. I have to use the Task Manager to kill VFP.EXE. One of the other buttons brings up an FPW screen from which I launch browse windows but they behave fine and they are not in Form1, which appears to be the form of the base form. Why the other button's browse is not confined to Form1 I do not know.
I've tried a few things including putting this code in the FIRST BUTTON's click procedure:
THISFORM.HIDE
THISFORM.Release
=CAPSLOCK(.T.)
DO b.prg
ON KEY LABEL LEFTMOUSE
=CAPSLOCK(.F.)
ON KEY LABEL esc
DO FORM djform
THISFORM.SHOW
The other buttons on the VFP form run fine when I merely hide the form, or in some cases don't even bother to hide the form. Hiding didn't help here so I added the RELEASE, but that hasn't helped either. As you see above, I tried releasing and regenerating, I suppose that can't work anyway, because the procedure doesn't exactly exist after the release? Anyway, I'd think that after releasing the form the programmatic sequences started by b.prg would run OK, but they don't at all.
b.prg starts the whole setup for the browse of this table. But the whole thing is haywire, the FPD type info never happens. Any ideas, tips? Thanks!