Martyn Hill wrote:
Dear list

Whilst I suspect that there is no 'simple' way to make an SBasic job
work with the PE - i.e. able to move #0/1/2 windows and put to sleep
in QPAC2 frame - without going the whole hog of making a PE compliant
application, but none-the-less wondered if someone could devise and
share a basic HowTo on the process.

I think I've read most of the PE documentation out there but I'm still at a loss to understand just what is required to be able to manipulate
an SBasic Job (0 or daughter SBasic jobs) with the PE.

I run QPC2 with QPAC2 and would invoke my copy of QDT more if I could
tame SBasic windows in this way.

Have I missed something obvious, or is it necessary to develop a
standalone app using the PE tools available just to achieve this?

Thanks for any ideas.

Martyn Hill
London.

Three possible answers here:

(1) If you mean interactive control of windows in a self-written program:

Central to handling the sbasic windows is the use of an OUTLN command.

Outlining defines the area of the screen saved for the job's windows.

To move the window, you'd need an outline of the whole screen, move the window and then the outline becomes that of the windows at the new positions.

To write such a "manual move" procedure, you'd need to write a procedure along these lines:

1. remember where origin is and display size coordinates
2. set an outline for the whole screen, e.g. w% = 512 : h% = 256 : IF VER$='HBA' THEN w%=SCR_XLIM:h%=SCR_YLIM 3. set a window to the program's window sizes and draw a border around it 4. write a routine to move the window under cursor key control to "drag" the window outline until you press space or enter to "drop" at that location.
5. redraw the program's windows at that point.
6. set new outline to that position.

This tends to be a brute force approach but is probably the main way if you intend to include a MOVE WINDOW command in a non-pointered program.

(2) Single command to move the windows:
The WMON and WTV commands can move the windows for you by using the 3 parameter versions, which I think are WTV mode,x_origin,y_origin and WMON mode,x_origin,y_origin.

(3) Per Witte has written some extensions which might help with moving and resizing Windows, though I can't remember the names of the extensions. They provide similar facilities to similar commands in Easyptr 4.

Simplest way to put a program to sleep in button frame is to use the BUTTON_SLEEP thing. Define a hotkey to call it: ERT HOT_WAKE(CHR$(233),'button_sleep')

Hope this helps, assuming I understood what you wanted to do correctly.

Dilwyn Jones


_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to