473,769 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1291
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
3591
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 several user controls that are inherited user controls, based on one class, which is in turn based on System.Windows.Forms.UserControl. We'll call this class "UserControlBase". My first problem is that UserControlBase implements some public...
0
1910
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 several user controls that are inherited user controls, based on one class, which is in turn based on System.Windows.Forms.UserControl. We'll call this class "UserControlBase". My first problem is that UserControlBase implements some public...
4
6074
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 of a Custom User Control, generated by adding a new Custom User Control to a project with VS.NET.
1
1193
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 Form, I don't know why the Inherited Web User Control have not any properties inherited from Base Web User Control. How should I do? The based web user control as: using System; ....
1
1624
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 actively on both project, changing the usercontrols and the second project (forms that uses the usercontrols). When I build my solutuion, my user controls become available in the Toolbox under "My user controls", with an icon of a user control, but...
8
6715
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 contains a few controls anchored to the sides of the form. "frmChild" inherits from "frmBase"... and the controls appear on the inherited form as expected. However things start going wrong when I place addition controls on the "frmChild" form. When I...
2
288
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 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...
0
1315
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 keyboard. What I have done is that every keystroke is entered into a textbox within my User Control. Want I want to do is to take that user input from keyboard textbox and display it within my main form. I also want to be able to close this control and...
3
1491
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 the same spot as each other, depending on what is being called at that particular time by the user. I have been trying to use Inherited user controls, but I am not able, and/or don't know how to retrieve the data from my Inherited user control. If...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.