VDb 5.5/5.7 QUERY WINDOW POSITIONS
VDb 5.5/5.7 QUERY WINDOW POSITIONS
(OP)
I need some help as I have spent a lot of days trying to work out my problem with the error
“Window out of range: xxx” .
I am using windows XP sp3 and my screen resolution is 1024 x 768, refresh rate 60Hz.
Using my .PRG files my programs of which there are three run just as I intended all the windows
display with the expected content.
I am submitting sample code in the hope that someone can assist me with the problem.
Program 1 (first.prg)
close all
clear all
clear
set directory to c:\fx
define window firstwin from 5,15 to 38,79
activate window firstwin
? "this is the first window"
wait
deactivate window firstwin
do two
&&&&&
define window fifthwin from 2,10 to 45,110
activate window fifthwin
? "this is the fifth window"
wait
deactivate window fifthwin
release windows
mwin = window()
? " window message"
if empty(mwin)
? "all windows are closed"
else
? "the open window is "
?? mwin
endif
wait
close all
clear all
Program 2 (two.prg) called from first.prg
define window twowin from 2,2 to 45,110
activate window twowin
? "this is the second window"
wait
deactivate window twowin
define window thirdwin from 4,6 to 24,79
activate window thirdwin
? "this is the third window"
wait
deactivate window thirdwin
release window thirdwin
do three
&&&&
return
Program 3
define window fourwin from 10,11 to 23,100
activate window fourwin
? "this is the fourth window"
wait
deactivate window fourwin
return
from here I wrote the following command line
compile first.prg,two.prg,three.prg auto to test.rsp
then
build from test.rsp to tryit.exe
in running tryit.exe the windows 1,2 & 5 were out of range but windows 3& 4
showed up ok. Running the .prg files all windows showed up.
I am using the ancient 16bit Visual Dbase 5.5/5.7 and find it is generally fantastic
but I can't get my head around this one. I also can't get my head around OOP either.
I'm 72. Is it a problem with the BDE or some setting. Please help if you are able
John
“Window out of range: xxx” .
I am using windows XP sp3 and my screen resolution is 1024 x 768, refresh rate 60Hz.
Using my .PRG files my programs of which there are three run just as I intended all the windows
display with the expected content.
I am submitting sample code in the hope that someone can assist me with the problem.
Program 1 (first.prg)
close all
clear all
clear
set directory to c:\fx
define window firstwin from 5,15 to 38,79
activate window firstwin
? "this is the first window"
wait
deactivate window firstwin
do two
&&&&&
define window fifthwin from 2,10 to 45,110
activate window fifthwin
? "this is the fifth window"
wait
deactivate window fifthwin
release windows
mwin = window()
? " window message"
if empty(mwin)
? "all windows are closed"
else
? "the open window is "
?? mwin
endif
wait
close all
clear all
Program 2 (two.prg) called from first.prg
define window twowin from 2,2 to 45,110
activate window twowin
? "this is the second window"
wait
deactivate window twowin
define window thirdwin from 4,6 to 24,79
activate window thirdwin
? "this is the third window"
wait
deactivate window thirdwin
release window thirdwin
do three
&&&&
return
Program 3
define window fourwin from 10,11 to 23,100
activate window fourwin
? "this is the fourth window"
wait
deactivate window fourwin
return
from here I wrote the following command line
compile first.prg,two.prg,three.prg auto to test.rsp
then
build from test.rsp to tryit.exe
in running tryit.exe the windows 1,2 & 5 were out of range but windows 3& 4
showed up ok. Running the .prg files all windows showed up.
I am using the ancient 16bit Visual Dbase 5.5/5.7 and find it is generally fantastic
but I can't get my head around this one. I also can't get my head around OOP either.
I'm 72. Is it a problem with the BDE or some setting. Please help if you are able
John
RE: VDb 5.5/5.7 QUERY WINDOW POSITIONS
Over the years some DOS-based displays could handle additional fonts such as VGA43 or VGA50 screens with up to 43 or 50 rows. I don't recall how many columns was the maximum.
If this is Visual dBase I don't have any knowledge of those specs. For now, it might be good to start with values that don't exceed 24 rows and 80 columns, remembering that both row and column positioning logic works from zero, not one. Once you confirm those work as expected then you can try larger windows.
This thread and its additional links indicate the various screen displays that may be possible.
thread290-1641043: more display resolution -db3plus-windows7
SET DISPLAY TO EGA50 && if doesn't work then try VGA50 instead -similar for EGA43 or VGA43