Running under Win 3.1 
Author Message
 Running under Win 3.1

Hi all,
   Need a bit of advice from you Pascal gurus out here.  I'm running
TP6 on a DOS/Win 3.1 based system.  There's two programs I've written
that I've tried running in the background.  While one of them works with
almost no perceptible effects, the other seems to not get along with
Windows.
   The first program is a program that counts different combinations of
things and tallies the info in an array.  Basically constructed as nested
FOR loops with a procedure call to tally the results in the inner loop.
I've run this one under Win and while it may slow down a little, I can
still switch away and do other stuff while it's running.
   The second, however, does not like to run under Windows.  It's a
solver for those "fit the pieces in the frame" type puzzles.  Since it
lends itself to it, and to save me the trouble of saving several
intermediate values at each step, it's written recursively.  Basically
it tries each open space to find a piece that fits, cycling through the
spaces on the board as it tries the pieces one by one.  When I run it under
Windows, it ties it up so much that the DOS prompt icon does not even
update, and there is no response from the mouse anywhere on the screen,
including double-clicking the DOS prompt.  
    My question is this: how come the programs act so differently?  Is
it because the recursive program *mainly* consists of subroutine calls
and returns, and that takes more time than a single call in the middle
of up to 6 nested loops? Secondarily, is there any way to force TP6 to
yield to Windows so it can get on with doing its thing?  I know for
Clipper, there is a library that's been written to yield timeslices to
Windows to make Clipper programs run friendlier; is there anything
similar I can do with TP6?

         Thanks for any info you can pass on...........

              Frank



Wed, 18 Jun 1902 08:00:00 GMT  
 Running under Win 3.1

Quote:

> Hi all,
>    Need a bit of advice from you Pascal gurus out here.  I'm running
> TP6 on a DOS/Win 3.1 based system.  There's two programs I've written
> that I've tried running in the background.  While one of them works with
> almost no perceptible effects, the other seems to not get along with
> Windows.
>    The first program is a program that counts different combinations of
> things and tallies the info in an array.  Basically constructed as nested
> FOR loops with a procedure call to tally the results in the inner loop.
> I've run this one under Win and while it may slow down a little, I can
> still switch away and do other stuff while it's running.
>    The second, however, does not like to run under Windows.  It's a
> solver for those "fit the pieces in the frame" type puzzles.  Since it
> lends itself to it, and to save me the trouble of saving several
> intermediate values at each step, it's written recursively.  Basically
> it tries each open space to find a piece that fits, cycling through the
> spaces on the board as it tries the pieces one by one.  When I run it under
> Windows, it ties it up so much that the DOS prompt icon does not even
> update, and there is no response from the mouse anywhere on the screen,
> including double-clicking the DOS prompt.
>     My question is this: how come the programs act so differently?  Is
> it because the recursive program *mainly* consists of subroutine calls
> and returns, and that takes more time than a single call in the middle
> of up to 6 nested loops? Secondarily, is there any way to force TP6 to
> yield to Windows so it can get on with doing its thing?  I know for
> Clipper, there is a library that's been written to yield timeslices to
> Windows to make Clipper programs run friendlier; is there anything
> similar I can do with TP6?

>          Thanks for any info you can pass on...........

>               Frank

When running DOS programs under Windows, they are actually running in a
DOS Window. You need to take control of that window and adjust its
settings. Start your program and, while holding down the Alt Key, press
the Space Bar. The Window will get smaller and you will see a Drop Down
Menu. Near the bottom is a choice called Settings. Select this and you
will see a window pop up. In the lower left corner are Check Boxes for
Exclusive and Background. Make sure that Background is checked and
Exclusive is not.

Then, in the upper right corner, are the Foreground/Background settings.
The lower the number in the Background box the less CPU time your
program is given while it is running in the background.

Leave the Full Screen/Windowed option (upper left) set to Windowed and
you will have access to the drop down menu with either Alt-Space or the
mouse. You can expiriment with different settings until you are
satisfied.

I hope this helps.

--
Val Mehling - anti-spam in effect.

http://home.earthlink.net/~valjm/



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating Win 3.1 apps/network apps in win 95

2. Pascal Compiler for Win 3.1 / Win 95

3. Delphi 2.0 on Win 3.1 with Win32s

4. Screen Saver Code for Win 3.1 ???

5. Printing problem in DOS-box in Win 3.1

6. Turbo Pascal for win 3.1

7. Hardware I/O under Win 3.1

8. CTRL-BREAK in WIN 3.1

9. joystick drivers for win 3.1

10. TPW 1.5 err 201 trashing Win 3.1 mouse

11. tpcx 6.0 under Win 3.1

12. EOutOfResources and Win 3.1

 

 
Powered by phpBB® Forum Software