I know we can center a window, but is there a way to force it to be positioned where you want. I need to open multiple programs, but would like them automatically set to a certain position. Is this possible?
Thanks,
Bill
Bill,
Doesn't SETSIZE do just what you need?
Brian
Not really. CENTERWINDOW centers the window in the screen. What I want to do is have the window in the upper right hand side of the screen for one program and lower right hand for the other. I think it will make it easier switching between the two programs and having it so I can see both screens at the same time.
Bill
Hi Bill,
Unless i misunderstand you completely, you can put a window wherever you want on the screen by using the WINDOW definition.
QuoteThe syntax of the OPENWINDOW function is:
OPENWINDOW variable, left, top, width, height, flags, parent, title, handler
Parameters:
variable - The name of the WINDOW variable used to store the window
left - The left edge of the window
top - The top edge of the window
width - The width of the window
height - The height of the window
flags - A numeric value specifying creation style flags
parent - a WINDOW variable if this is a child window or NULL
title - The text shown in the caption of the window
handler - The address of a subroutine to handle messages for the window. Use the & operator.
See the Users Guide "Windows Programming" and select "Creating a Window".
Egil
Egil, that was 100% what I was looking for. I have done CENTERWINDOW on every program, so never even tried to just let it fall where it may. I was just thinking that it would work like other programs, where every time you bring it up it moves over a little and down a little. Didn't think it would stay static at a fixed position.
So, Thank you,
Bill
Bill,
I'm doing something similar in my editor program.
I wanted a second screen up, but thought it would help if it was moved down slightly so you can still see the top few lines of code in the main program:
CASE @IDCREATE
'Centre window and move down a little
'so you can see in the rich edit what the search case screen has found easier.
CENTERWINDOW w16
INT wl,wt,ww,wh
GETSIZE w16,wl,wt,ww,wh
SETSIZE w16,wl,wt+30,ww,wh
Andy.
I still stand by my comment on SETSIZE. You initially create your window(s) with OPENWINDOW, positioning as required, then if you want to move them, you use SETSIZE to do that
Brian
Build a Visual Designer and you'll have GETSIZE and SETSIZE coming out your ears. LOL!
No, thanks!