🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.oodesign
Article #18

Re: Overloading FormShow

#18
From: Shannon Peterson
Date: Mon, 21 Jun 2004 14:13
45 lines
2330 bytes
Well I've tried to overrige it but with no success.

how would you do it.  I would like to say override the FormShow and 
FormShowModal functions and pass in a AnsiString.

the Calls that would be accepted would be as follows.

Form2->Show();
Form2->ShowModal();
Form2->Show(this, "string");
Form2->ShowModal(this,"string");

"this" is a TObject pointer
Form2 is the form I would like to open with the extra parameter it can 
be opened from lets say Form1.

What I need is how do I set up the override in the Form2 header file. 
(i.e. were to place the override for DoShow, before the class, in the 
class public??...., how it should look example of the header line, 
etc..)  After that I can probably figure out the rest.

thanks

Shannon

Mark Guerrieri wrote:
> TForm (or TCustomForm, not sure which) should defind the protected method
> DoShow wheich calls the OnShow hadler, if I remeber correctly.  You can
> override DoShow to do whatever you want...
> 
> Mark
> 
> "Shannon Peterson" <speterson@ae-solutions.com> wrote in message
> news:40d0751e$1@newsgroups.borland.com...
> 
>>Does anyone know if one is able to Overload the FormShow function using
>>TForm so that I can call FromShow normally and call it with extra
>>parameters???
>>
>>thanks
>>
>>shannon
> 
> 
> 
Technical Details
Message-ID: <40d6ed22$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40d0751e$1@newsgroups.borland.com> <40d3d83f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10db1e,75d130d858957569
X-Google-Attributes: gid10db1e,public
Date: Mon, 21 Jun 2004 09:13:55 -0500
From: Shannon Peterson <speterson@ae-solutions.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.oodesign
Subject: Re: Overloading FormShow
References: <40d0751e$1@newsgroups.borland.com> <40d3d83f@newsgroups.borland.com>
In-Reply-To: <40d3d83f@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 12.2.62.130
Message-ID: <40d6ed22$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1087827234 12.2.62.130 (21 Jun 2004 07:13:54 -0700)
Lines: 45
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail