🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #32524

Re: showmodal and do something

#32524
From: Jens Geyer
Date: Fri, 22 Nov 2002 09:10
30 lines
1617 bytes
> I know I've done this before, but...lost it. I want to show a status form.
> It should be shown modal. When form is on the screen, I would like to do
> something, after that, close it. How?
>

const WMU_BoldAction = WM_USER + 1;

type TModalForm = ...
           ...
           procedure OnWMUBoldAction( var msg : TMsg); message
WMU_BoldAction;
        end;


procedure TModalForm.OnShow;
begin
  // required stuff to init the form here
  PostMessage( Handle, WMU_BoldAction, 0,0);
end;

procedure TModalFormOnWMUBoldAction( var msg : TMsg);
begin
   DoWhatYouWant;
   DoSomethingElse;
   Close;
end;

(not tested)
JensG
Technical Details
Message-ID: <3dddf1f5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3dddd997$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,7cfd3117308f184f,start
X-Google-Attributes: gid109d30,public
X-Google-ArrivalTime: 2002-11-22 01:17:04 PST
From: "Jens Geyer" <jgx@vsx.net>
Newsgroups: borland.public.delphi.language.objectpascal
References: <3dddd997$1@newsgroups.borland.com>
Subject: Re: showmodal and do something
Date: Fri, 22 Nov 2002 10:10:40 +0100
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 217.80.143.212
Message-ID: <3dddf1f5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1037955573 217.80.143.212 (22 Nov 2002 00:59:33 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail