Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is there an easy way the center forms

Re: Is there an easy way the center forms

From: Yar <yarsegal_at_my-deja.com>
Date: Fri, 24 Sep 1999 16:19:25 GMT
Message-ID: <7sg89u$a0a$1@nnrp1.deja.com>


In article <7sf07j$cpr$1_at_nnrp1.deja.com>,   shamsnaveed_at_my-deja.com wrote:
> In article <kcqG3.2592$x7.65506942_at_nr1.ottawa.istar.net>,
> "Rod Smith" <rdsmith_at_ns.sympatico.ca> wrote:
> > I'm new to Oracle and am using Developer 2000. I'd like to center
> forms and
> > windows on the screen. Is there an easy way to do this?
> >
> >
> sorry pal! but the only way to do it is manual work. width of 800x600
> window is 590 to 594 pixels. So take 295 pixel as standard center
> point and align everything accordingly.
> shams
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Never assume that a user has some specific resolution because he or she is free to change it at any time. Therefore, you should center your windows during the runtime. That way, your applcations will always look great, no matter what resolution they are running with. You may want to create a procedure for centering windows, and put it in a library. For example:

PROCEDURE CenterWindow(NameofWindow in string) IS

 mdiheight number;
 mdiwidth number;
 CWHeight number;
 CWWidth number;

BEGIN

  mdiheight     := Get_Window_Property(FORMS_MDI_WINDOW,Height);
  mdiwidth      := Get_Window_Property(FORMS_MDI_WINDOW,Width);
  CWHeight      := Get_Window_Property(NameofWindow,Height);
  CWWidth       := Get_Window_Property(NameofWindow,Width);

  SET_WINDOW_PROPERTY(NameofWindow, X_POS, ((mdiwidth/2) - (CWWidth/2))-5);
  SET_WINDOW_PROPERTY(NameofWindow, Y_POS, ((mdiheight/2) - (CWheight/2))-5);
END; Hope this helps.

Yar

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Sep 24 1999 - 11:19:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US