Need help with code which won't run

I am unable to find what is wrong with a line of code.
When I step through the procedure it hits this line and the stepping bounces back to the beginning of the procedure. It works just fine in Pan6.
The code is:
Setwindow 2000,2000,20,20,""
I understand it has been deprecated but supposedly still works. It is from a Pan6 db which I am trying to convert to PanX. No debug info is presented.
Jack

The setwindow statement doesn’t do anything by itself. It simply sets the stage for the next openform statement. So if you run this statement by itself (which is what you are doing when single stepping), nothing will happen. This statement won’t work when single stepping, it has to be run at “full speed”. (There are quite a few problems with single stepping in Panorama X, but that is a separate matter from this specific issue. In fact, you could not single step the setwindow statement in Panorama 6 either, for the same reason.)

Have you tried simply running your procedure, not single stepping it? I’ll bet it will run. Since you haven’t provided the complete code, I can’t say for sure.

That said, I would rewrite your code to get rid of this statement. Assuming that the next line is openform, I would change it like this:

openform "my form","rectangle",rectanglesize(2000,2000,20,20)

The openform statement now has quite a few nice options built into it.

However, why are you opening a 20x20 window off the edge of the monitor? That’s a technique from Panorama II, it hasn’t been necessary since 1996. You can now use secret windows, or simply use the setactivedatabase statement if you want to perform a few actions in another database without actually changing windows.

Jim - Thanks for your candor on the procedure stepping. I have been counting heavily on this to debug the transfer problems from Pan6 to PanX which I am having so I will stop relying on it. You asked why I wanted to step; it is so that I can see what happens as each line of code is executed. It would have been invaluable in debugging.
FYI, the reason I am hiding windows off-screen, rather than using another technique, is that when a user closes a window on any one of 5 databases which are open simultaneously, I need to ensure that the it’s associated database does not close. I use all 5 interactively and they must remain open.
Regarding re-coding this system, right now, my objective is to get it working again with as little new code as possible. I will undoubtedly do some code updates over time, but I don’t have time to do it all right now.
Thanks for your help.