Article View: borland.public.cppbuilder.deployment
Article #155Re: getting error message "Cannot change Visible in OnShow or OnHide"
From: Michael Bowen
Date: Wed, 17 Aug 2005 21:45
Date: Wed, 17 Aug 2005 21:45
43 lines
2588 bytes
2588 bytes
Ok I figured it out. It was something along those lines. I was not setting
the Visible property but I was doing this:
void __fastcall TMyForm::FormActivate(TObject *Sender)
{
if (some error condition)
{
exit(0);
}
}
I suspect that since "exit" cause the app to close (and thus the visibility
to change), this triggers that error message.
"Steve" <sdardari_NOSPAM_@rimini.com> wrote in message
news:4301cb34$1@newsgroups.borland.com...
>
> HI Michael,
>
>> Hello all,
>> I'm using C Builder 6 and I have an app that runs fine in the ide or on
>> the same machine it was compiled on. I compile it statically; and
>> install the ocx that it needs. When I run the app on another machine I
>> get the error message "Cannot change Visible in OnShow or OnHide". Am I
>> missing something? What do I need to install to get the app to run.
>
> Probably you try to use Form->Visible inside an Form->OnShow or
> Form->OnHide event ?
>
> Sometimes I've same problem (error) with one my application, but I've to
> call the winapi ShowWindow(Application->Handle, SW_HIDE), to show/hide the
> mainform button-window in the start-bar area, because in that case, my app
> is iconified on the icontray and MainForm is not showed until a
> doubleclick on the trayicon.
>
> To solve try to check your code in the OnShow - OnHide Form event ... I
> think you can start from here.
>
> If you discover something of intresting let know us!
>
> Bye,
> Steve
>
>
Technical Details
Message-ID:
<4303aff0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43016756$1@newsgroups.borland.com> <4301cb34$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,aeacec2a25e80f94 X-Google-Attributes: gidf8e54,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Michael Bowen" <mbowen@hansenmedical.com> Newsgroups: borland.public.cppbuilder.deployment References: <43016756$1@newsgroups.borland.com> <4301cb34$1@newsgroups.borland.com> Subject: Re: getting error message "Cannot change Visible in OnShow or OnHide" Date: Wed, 17 Aug 2005 14:45:27 -0700 Lines: 45 Organization: Hansen Medical X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.50.11.122 Message-ID: <4303aff0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124315120 69.50.11.122 (17 Aug 2005 14:45:20 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail