🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Run Once

#9952
From: Remy Lebeau (TeamB)
Date: Tue, 01 Jun 2004 04:33
31 lines
2143 bytes
"JD" <nospam@nospam.com> wrote in message
news:40bbec83$1@newsgroups.borland.com...

> It did nothing to change the state. I think that you and I
> have an expectation of the WindowState being wsMinimized
> when the form is minimized and that is not always the case.

My expectations come from looking directly at the VCL source code.
UpdateWindowState() forces the WindowState property to be set to the current
state of the window:

    procedure TCustomForm.UpdateWindowState;
    var
        Placement: TWindowPlacement;
    begin
        if HandleAllocated then
        begin
            Placement.length := SizeOf(TWindowPlacement);
            GetWindowPlacement(Handle, @Placement);
            case Placement.showCmd of
                SW_SHOWMINIMIZED: FWindowState := wsMinimized;
                SW_SHOWMAXIMIZED: FWindowState := wsMaximized;
            else
                FWindowState := wsNormal;
            end;
        end;
    end;


Gambit
Technical Details
Message-ID: <40bc0835$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40b9cff4$1@newsgroups.borland.com> <k5ikb0dppip15jep979bhuf7g148fsp3lj@4ax.com> <40ba78cc$1@newsgroups.borland.com> <40ba7ce2$1@newsgroups.borland.com> <40ba7f15$1@newsgroups.borland.com> <40ba9d87$1@newsgroups.borland.com> <40bb3815$1@newsgroups.borland.com> <40bba7d2$1@newsgroups.borland.com> <40bbec83$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,55fa8aeaf57fcad1
X-Google-Attributes: gid10cc67,public
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40b9cff4$1@newsgroups.borland.com> <k5ikb0dppip15jep979bhuf7g148fsp3lj@4ax.com> <40ba78cc$1@newsgroups.borland.com> <40ba7ce2$1@newsgroups.borland.com> <40ba7f15$1@newsgroups.borland.com> <40ba9d87$1@newsgroups.borland.com> <40bb3815$1@newsgroups.borland.com> <40bba7d2$1@newsgroups.borland.com> <40bbec83$1@newsgroups.borland.com>
Subject: Re: Run Once
Date: Mon, 31 May 2004 21:33:49 -0700
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 67.22.135.163
Message-ID: <40bc0835$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086064693 67.22.135.163 (31 May 2004 21:38:13 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail