473,396 Members | 1,766 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,396 software developers and data experts.

User Inherited Controls Question

Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC
Sep 17 '05 #1
2 1271
Ron
I assume you are inheriting from another form. On the base class, handle the
Click event for the command buttons and change the Text property accordingly.

"Terrance" wrote:
Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC

Sep 17 '05 #2
HEY RON:
No I'm not inheriting from another form.
--
TC
"Ron" wrote:
I assume you are inheriting from another form. On the base class, handle the
Click event for the command buttons and change the Text property accordingly.

"Terrance" wrote:
Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC

Sep 17 '05 #3

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

Similar topics

0
by: Jim | last post by:
I am having some trouble with user controls and would appreciate any input / advice on where to go with this... :) 1. The first problem, and perhaps the root of the others, is that I have...
0
by: Jim | last post by:
I am having some trouble with user controls and would appreciate any input / advice on where to go with this... :) 1. The first problem, and perhaps the root of the others, is that I have...
4
by: Paradox | last post by:
Hey, I'm trying to figure out what situations call for the use of a derived form control such as: public class myListBox : System.Windows.Forms.ListBox and what situations call for the use...
1
by: ABC | last post by:
I write a Base Web User Control which contains several public properties and a Inherited Web User Control which only have some codes in new method. When I use the Inherited Web User Control on Web...
1
by: Philippe Meunier | last post by:
Ok, I already asked a question similar to this one but didn't found any answer ! I've a solution with 2 projects in it. One of the project contains Usercontrols and Inherited Controls. I work...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
2
by: Terrance | last post by:
Hello all I have a question I'm hoping someone can shed some light on. I have 2 user Inherited Controls on a form. When I click 1 inherited control I would like to change the text of the other...
0
by: MikeY | last post by:
Hi everyone, I posted a question very early today, but maybe I wasn't articulate enough. Hopefully this will illicit a response I've created a windows form and a User Control. This is a...
3
by: MikeY | last post by:
Hi everyone, I'm trying to figure out, on my windows form, of what is the best way to add various custom controls at various times during run-time. The problem is that they will need to be in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.