I've been following this discussion about forms overlaying forms with
interest, and have been surprised that no one has mentioned the lovely DLL
RGETCNTR.DLL which automatically centers a sized form (non full screen) on
whatever monitor you are using.
I learned about this DLL from the folks at RBTI so I know it is available -
if you can't get it from them, ask me privately and I'll send it on.
THe basic idea of the DLL is that it creates the coordinates for you at run
time. An example of the syntax is:
SET VAR vSize = (UDF('@RGetCntr.DLL','255,330'))
EDIT USING SPMDI WHERE TERRIT = .fTERRIT AT &vSize
The numbers are the width and height in pixels of the form. In practice,
I've found that the DLL tends to give you more space than you really need,
so I go into the forms designer, note the size of the form as Danielle has
described (Layout / Resolution guidelines in the menu) and then subtract 20
from the width and 70 from the height as starters - then adjust slightly if
needed. This DLL works great and will display the same form on two
different resolution monitors CENTERED on the screen.
David Blocker
The 255 and 330 are the width and the height in pixels
----- Original Message -----
From: "daniele-bmb" <[EMAIL PROTECTED]>
To: "R:BASElist" <[EMAIL PROTECTED]>
Sent: Tuesday, September 24, 2002 8:08 AM
Subject: Fw: form in a form
> >
> > The AT did it, thanks -- but it sure is a lot of work to get the right
> > coordinates. Know of any shortcuts?
> > Doesn't make any diff if I use MDI or not. So I still don't understand
> > MDI.
> >
> ------------------------------------------------
>
> I think that my previous mail was incorrectly send.
>
> In order to have the form coordinates, we use this methodology:
>
> 1) The first form have a field (or button) with associated EEP that call
> the second form...and so on....
> 2) The first form is a full screen form (without the AT x1,y1,x2,y2
option)
> 3)The called form is designed starting on the upper left corner of the
> screen area
> 4) When you have inserted all fields, buttons, ecc you must draw a box
aroud
> your
> fields to delimit the dimension of your form. The status line of form
> designer show the values x: y: cx: cy:
> (the dimension of the box)
> 5) add 30 pixels (or more) to the values of x2 and y2 (depending of your
> screen
> resolution)
> 6) In your EEP use the command EDIT USING formname AT x1,y1,x2,y2
>
> If you don't like the status bar in the called forms, you can control the
> system variable RBTI_NOSTATUS
>
> SET VAR RBTI_NOSTATUS=0
> EDIT USING formname AT 3,3,410,421 (fo example)
> CLEAR VAR RBTI_NOSTATUS
>
> I've a zipped WORD document (83.5 KB) containing some images showing the
> method described that I can send you (and to all friends of the list) at
> your private e-mail.
>
> Hope this help
>
> Daniele Barbieri
> from Italy
> [EMAIL PROTECTED]
> www.bmbinformatica.it
>
>
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
>
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/