🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Comunication beetween 2 forms

#4939
From: alfred
Date: Wed, 12 Oct 2005 22:22
20 lines
1904 bytes
>That is generally not a good idea.  If you want to display child windows
>inside the Main Form, then you should be using MDI instead.

Ah thank you very much.
I have created a Form with "fsMDIForm" and another Form with "fsMDIChild". Now I have tried to insert a simple label in the main form and another one in the child form. It is a simple mouse event click. Every time i press a mouse button the label is set to "1", and it is set to "0" onmouseup.
Here is my problem.
The child window's label is ok, but it is not the one on the main form. It seems is not updated, it need a refresh i think. here is the code :

Label1->Caption="1";   // this is a form2, the child
Form1->Label1->Caption = "1";

I have tryed :
Form1->Label1->Repaint();
Form1->Label1->Refresh();
with no effects.
If I make another child form and I move le label in this new one form it is ok.
I cannot use the main form and I have to use only the child form ?
Thank you very much
Alfred
Technical Details
Message-ID: <434d8ca5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <434c5288$1@newsgroups.borland.com> <434c7632$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,44c755519a14ea21
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "alfred" <alfredo@freemail.it>
Sender: "alfred" <alfredo@freemail.it>
Reply-To: "alfred" <alfredo@freemail.it>
Subject: Re: Comunication beetween 2 forms
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 82.50.147.63     
References: <434c5288$1@newsgroups.borland.com> <434c7632$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <434d8ca5$1@newsgroups.borland.com>
Date: 12 Oct 2005 15:22:29 -0700
X-Trace: newsgroups.borland.com 1129155749 207.105.83.66 (12 Oct 2005 15:22:29 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail