🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Comunication beetween 2 forms

#5127
From: alfred
Date: Wed, 12 Oct 2005 00:02
14 lines
1343 bytes
Hello, I have 2 form. 1 is the main one and one is a child in the main window. I use this code :
TForm2 *Child = new TForm2(Application);
Child->ParentWindow = Form1->Handle;
Child->Left = 50;
Child->Top = 50;
Child->Width = 100;
Child->Height = 400;
Child->Show();
It work fine but I have a problem with mouse manipolation in Child form. I can check if mouse is pressed and store it in a int variable, but when I try to load from the main form with (example): Label1->Caption = Child->Label1->Caption;
I get "access violation at address xxxxx" and BCB6 stop in the last line.
How can i do ?
Thank you
Alfred
Technical Details
Message-ID: <434c5288$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,44c755519a14ea21,start
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: Comunication beetween 2 forms
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 87.0.220.230     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <434c5288$1@newsgroups.borland.com>
Date: 11 Oct 2005 17:02:16 -0700
X-Trace: newsgroups.borland.com 1129075336 207.105.83.66 (11 Oct 2005 17:02:16 -0700)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail