πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Win 2000/XP question

#16624
From: Remy Lebeau (TeamB)
Date: Fri, 09 May 2003 16:12
29 lines
2049 bytes
"Juan Diego GarcοΏ½s" <jgarces@amics.ch> wrote in message
news:3ebb8936@newsgroups.borland.com...
> When I use the BringToFront method of the
> TApplication Class, the only thing can I see, is
> the icon of the application that is blinking in the
> taskbar, but the application in not brought
> to the front.

If the application was not already the input-active process (the process
receiving the user's input) when you call BringToFront(), then the
application cannot bring itself it to the front.  The OS won't allow it.
Only the input-active process is allowed to set the foreground window.
TApplication::BringToFront() uses the SetForegroundWindow() function, but
Microsoft made a behavioral change to SetForegroundWindow() in Win98 and
Win2K to prevent exactly what you are trying to do.

> This method in Win NT works fine. What have
> I do to get the same behaivor of this method
> in Win 2000/XP?

Have a look at Microsoft's documentation for SetForegroundWindow() for
information about the issue:

    SetForegroundWindow Function
    http://makeashorterlink.com/?T22E16184


Gambit
Technical Details
Message-ID: <3ebbd2ec$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ebb8936@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,228670448afecb0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-09 09:21:13 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ebb8936@newsgroups.borland.com>
Subject: Re: Win 2000/XP question
Date: Fri, 9 May 2003 09:12:09 -0700
Lines: 31
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: <3ebbd2ec$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052496620 207.175.226.26 (9 May 2003 09:10:20 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail