473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

1 object on 2 different Form objects

xnn
Hi,

I would like to know why an object Label cannot be used on
2 different object Forms at the same time?
It has the impct of run-time error.

Thank you very much.
regards
Nov 15 '05 #1
2 1275
xnn, what is the error that you are seeing? Are you creating a label object
and then trying to add it to both forms? You are right, it is illegal for a
label to have more than one parent control. One label cannot belong to the
ControlCollection of multiple forms. Why not just create another label?

--
Greg Ewing [MVP]
http://www.citidc.com

"xnn" <xn*@noone.com> wrote in message
news:6b****************************@phx.gbl...
Hi,

I would like to know why an object Label cannot be used on
2 different object Forms at the same time?
It has the impct of run-time error.

Thank you very much.
regards

Nov 15 '05 #2
xnn
Hi Greg,

Thanks for your reply.
The reason I do not want to create another label is this.
I have also another button and textbox which I want them
to have the same behavior on 2 different forms.

If I create different ones, says:
1) Button1 and TextBox1
2) Button2 and TextBox2
and whatever changes to TextBox1 should be reflected in
TextBox2. If using 2 different objects, then I have to
maintain 2 different methods of the same functionality and
it is hard to maintain later on.

Any idea would be appreciated.
Thank you.
regards
-----Original Message-----
xnn, what is the error that you are seeing? Are you creating a label objectand then trying to add it to both forms? You are right, it is illegal for alabel to have more than one parent control. One label cannot belong to theControlCollection of multiple forms. Why not just create another label?
--
Greg Ewing [MVP]
http://www.citidc.com

"xnn" <xn*@noone.com> wrote in message
news:6b****************************@phx.gbl...
Hi,

I would like to know why an object Label cannot be used on 2 different object Forms at the same time?
It has the impct of run-time error.

Thank you very much.
regards

.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Timo J | last post by:
Hi - Im sitting and trying to understand this OOP - and need to create a class wich can do the following.. ShowBlocks() - Displays the data wich is inside it - If empty creates a form wich sends...
3
by: OsD | last post by:
I'm having trouble with the workflow described bellow: 1. Asp page 1 on server A contains an iframe. 2. Asp page 1 submits a form targeted to the iframe, to Asp page 2 on server B. 3. Asp page...
3
by: QA | last post by:
It works fine in IE and Opera, but in Firefox, I had to put the <img name=something src> within a <form></form> it seems to me in IE/Opera, i can do document.imagename.src in Firefox I have...
11
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
6
by: Pablo | last post by:
Hello, I am writing a windows application using C++ and BorlandBuilder 6 compiler. It is an event driven program and I need to create objects of some classes written by me. One of the classes...
4
by: Jess | last post by:
Hello, I tried several books to find out the details of object initialization. Unfortunately, I'm still confused by two specific concepts, namely default-initialization and...
5
by: David Palau | last post by:
I'm looking for some guidance on what data type would work best as the result output of a web service function method. This web method will return an object that implements a class that is...
1
by: Dave | last post by:
I have multiple forms that will create an object. Basically a energy efficiency measure object. The measure object will have a couple of required properties set but after that it can have 10-20...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.