🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: fsStayOnTop and Debugging

#16952
From: Nico Bendlin
Date: Wed, 16 Apr 2003 15:26
30 lines
1808 bytes
Rusty wrote:
> Is there any way to make forms that have the FormStyle, fsStayOnTop,
> disappear when you encounter a breakpoint, exceptions, etc.?

Don't know, but while debugging you may consider
to not using fsStayOnTop while developing/debug.
Some snippet:

{$IFDEF WIN32}  // only on Windows
{$IFOPT D+}     // if compiled with debug informations
// not available in Windows 95a/b
function IsDebuggerPresent: BOOL; stdcall;
   external kernel32 name 'IsDebuggerPresent';
{$ENDIF}
{$ENDIF}

procedure TForm1.CreateParams(var Params: TCreateParams); // override;
begin
   inherited CreateParams(Params);
{$IFDEF WIN32}
{$IFOPT D+}
   if IsDebuggerPresent() then
   begin
     Params.ExStyle := Params.ExStyle and not WS_EX_TOPMOST;
     if (FormStyle = fsStayOnTop) then
       FormStyle := fsNormal;
   end;
{$ENDIF}
{$ENDIF}
end;
Technical Details
Message-ID: <3e9d7597@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e9d7031$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c30999487257a628
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-16 08:29:30 PST
Date: Wed, 16 Apr 2003 17:26:15 +0200
From: Nico Bendlin <nicode@net.gmx>
User-Agent: Mozilla/5.0
X-Accept-Language: de, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: fsStayOnTop and Debugging
References: <3e9d7031$1@newsgroups.borland.com>
In-Reply-To: <3e9d7031$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 149.225.50.204
Message-ID: <3e9d7597@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050506647 149.225.50.204 (16 Apr 2003 08:24:07 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail