🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Form Move

#627
From: Asger Joergensen
Date: Sun, 10 Feb 2008 16:18
32 lines
1828 bytes
Hi bar 
 
 bar says:
> Hi asger
> 
> I used your code
> But when the first time i am getting a exception
> 
> Can not change the Visible on OnShow and OnHide
> 
> Any idea how to handle this.

It is very difficult to answer such a question without seing Your 
code so please show the code You are using. 
There is nothing in the code I wrote that gives that exception.

But if You are doing something with visible as responce to that
message You need to make sure that the form is finished creating.

You can set a bool in the form show event and then chek it in 
the message or You can check the ComponentState to make sure that
the form is created.
You can also check the Parent property if that is NULL don't 
do anything.

if You want to adjust the size or pos of the form You shuld chage 
the the values in the WINDOWPOS structure and not use the properties 
of the form.

Kind regards
Asger
Technical Details
Message-ID: <MPG.221942364329915a989a5e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <47ad8f68@newsgroups.borland.com> <MPG.2217d2dd8d951dea989a5a@newsgroups.borland.com> <47af1cf9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,271a211e1db5ddd
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Joergensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Form Move
Date: Sun, 10 Feb 2008 17:18:23 +0100
Message-ID: <MPG.221942364329915a989a5e@newsgroups.borland.com>
References: <47ad8f68@newsgroups.borland.com> <MPG.2217d2dd8d951dea989a5a@newsgroups.borland.com> <47af1cf9@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.220.89
X-Trace: newsgroups.borland.com 1202660300 83.73.220.89 (10 Feb 2008 08:18:20 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail