🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13658

Re: Form Position

#13658
From: Remy Lebeau (TeamB)
Date: Mon, 22 Sep 2003 19:09
24 lines
1663 bytes
"Julian Bourne" <julian.bourne@britesc.com> wrote in message
news:3f6f461f$1@newsgroups.borland.com...

> Used following code in OnShow event... In case anyone else needs it.

Just an FYI, you shouldn't use the global form pointer while you're already
inside the form's code.  You should use the inplicit 'this' pointer instead,
ie:

    RECT rc;
    SystemParametersInfo(SPI_GETWORKAREA, NULL, &rc, 0);
    Top = rc.bottom - Height;
    Left = rc.right - Width;

Which is the same as this:

    RECT rc;
    SystemParametersInfo(SPI_GETWORKAREA, NULL, &rc, 0);
    this->Top = rc.bottom - this->Height;
    this->Left = rc.right - this->Width;


Gambit
Technical Details
Message-ID: <3f6f48a9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f6f3e74$1@newsgroups.borland.com> <3f6f461f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7d5ce00dfbb7768b
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-22 12:09:45 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f6f3e74$1@newsgroups.borland.com> <3f6f461f$1@newsgroups.borland.com>
Subject: Re: Form Position
Date: Mon, 22 Sep 2003 12:09:35 -0700
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f6f48a9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1064257705 207.175.226.26 (22 Sep 2003 12:08:25 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail