1. Centering a Window

How would I center this on the user's screen?

constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
0, Default, Default, 450, 250, 0, 0 )

new topic     » topic index » view message » categorize

2. Re: Centering a Window

sequence ScreenSize
ScreenSize = getCtlSize(Screen)
constant
ScreenWidth = ScreenSize[1],
ScreenHeight = ScreenSize[2],
Window_Install = 
createEx(Window,"Parcheesi",0,ScreenWidth/2-225,(ScreenHeight/2-125,450,250,0,0)

C. K. Lester wrote:

>
>How would I center this on the user's screen?
>
>constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
>0, Default, Default, 450, 250, 0, 0 )
>
>
>
>

-- 
Don't worry about people stealing your ideas. If your ideas are any good, you'll
have to ram them down people's throats.
-- Howard Aiken

new topic     » goto parent     » topic index » view message » categorize

3. Re: Centering a Window

Oops. Obviously the window caption should have been "Forms On-A-Disk 
AutoInstall" and that ( in the middle shouldn't be there. :-[

1evan at sbcglobal.net wrote:

> ScreenSize = getCtlSize(Screen)
> constant
> ScreenWidth = ScreenSize[1],
> ScreenHeight = ScreenSize[2],
> Window_Install = 
>
> createEx(Window,"Parcheesi",0,ScreenWidth/2-225,(ScreenHeight/2-125,450,250,0,0)
>
>
> C. K. Lester wrote:
>
>>
>> How would I center this on the user's screen?
>>
>> constant Window_Install = createEx( Window, "Forms On-A-Disk 
>> AutoInstall",
>> 0, Default, Default, 450, 250, 0, 0 )
>>
>>

-- 
Don't worry about people stealing your ideas. If your ideas are any good, you'll
have to ram them down people's throats.
-- Howard Aiken

new topic     » goto parent     » topic index » view message » categorize

4. Re: Centering a Window

As long as the width and length are even numbers you can do this ...

constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
0,
          {1,-wid}/2, {1,-hgt}/2, wid, hgt, 0, 0 )

If either are odd numbers you can do this ...

constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
0,
          {0.5,floor(-wid/2)}, {0.5,floor(-hgt/2)}, wid, hgt, 0, 0 )

----------------
cheers,
Derek Parnell
----- Original Message -----
From: "C. K. Lester" <cklester at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, December 11, 2002 6:29 AM
Subject: Centering a Window


>
> How would I center this on the user's screen?
>
> constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
> 0, Default, Default, 450, 250, 0, 0 )
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: Centering a Window

Now, that's cool!  You learn something new every day.  (Now if I would 
just do something usefull with it)

Derek Parnell wrote:

>
>As long as the width and length are even numbers you can do this ...
>
>constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
>0,
>          {1,-wid}/2, {1,-hgt}/2, wid, hgt, 0, 0 )
>
>If either are odd numbers you can do this ...
>
>constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
>0,
>          {0.5,floor(-wid/2)}, {0.5,floor(-hgt/2)}, wid, hgt, 0, 0 )
>
>----------------
>cheers,
>Derek Parnell
>----- Original Message -----
>From: "C. K. Lester" <cklester at yahoo.com>
>To: "EUforum" <EUforum at topica.com>
>Sent: Wednesday, December 11, 2002 6:29 AM
>Subject: Centering a Window
>
>
>>How would I center this on the user's screen?
>>
>>constant Window_Install = createEx( Window, "Forms On-A-Disk AutoInstall",
>>0, Default, Default, 450, 250, 0, 0 )
>>
>>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Centering a Window

CK has over 4000 lines of code to work with "that I wrote for him".
If he cant figure it out then he really should ask me....

Im stuck on registry and ntfs code because Its rather hard.
I am learning that the users of 2k, NT4, and XP + mainly the pro
editions require the user to be logged on as administrators.
and this posses some issues.

Xanax

----- Original Message -----
From: <1evan at sbcglobal.net>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, December 10, 2002 2:56 PM
Subject: Re: Centering a Window


:
: Oops. Obviously the window caption should have been "Forms On-A-Disk
: AutoInstall" and that ( in the middle shouldn't be there. :-[
:
: 1evan at sbcglobal.net wrote:
:
: > ScreenSize = getCtlSize(Screen)
: > constant
: > ScreenWidth = ScreenSize[1],
: > ScreenHeight = ScreenSize[2],
: > Window_Install =
: >
createEx(Window,"Parcheesi",0,ScreenWidth/2-225,(ScreenHeight/2-125,450,250,0,0)
: >
: >
: > C. K. Lester wrote:
: >
: >>
: >> How would I center this on the user's screen?
: >>
: >> constant Window_Install = createEx( Window, "Forms On-A-Disk
: >> AutoInstall",
: >> 0, Default, Default, 450, 250, 0, 0 )
: >>
: >>
:
: --
: Don't worry about people stealing your ideas. If your ideas are any good,
you'll have to ram them down people's
throats.
: -- Howard Aiken
:
:
:
:
:

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu