🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.deployment
3 messages
3 total messages Started by Michael Bowen Tue, 16 Aug 2005 04:11
getting error message "Cannot change Visible in OnShow or OnHide"
#153
Author: Michael Bowen
Date: Tue, 16 Aug 2005 04:11
9 lines
1347 bytes
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.

Thanks in advance. 
Re: getting error message "Cannot change Visible in OnShow or OnHide"
#154
Author: Steve
Date: Tue, 16 Aug 2005 11:16
26 lines
1982 bytes
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
Re: getting error message "Cannot change Visible in OnShow or OnHide"
#155
Author: Michael Bowen
Date: Wed, 17 Aug 2005 21:45
43 lines
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
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads