473,473 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Visual Inheritance in WinForms

If I have a form, say FORM_FOO, and a form that it inherits from, say
FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do
I make FORM_FOO actually do true inheritance when I change BTN_RETURN
on FORM_BAR? In order to actually do that, I have to open every form
that inherits from FORM_BAR and remove the code manually from
InitializeComponents(). <Never mind the fact that it needs to be
checked in and out of source safe>. There MUST be a way to make it
actually work correctly.

Please help!
Thanks in advance,
~Patrick Corkum
Nov 22 '05 #1
2 1342
Hi Patrick

How are you changing the BTN_RETURN, and what exactly is the code that you
have to remove from the InitializeComponent() method?

Charles
"Patrick Corkum" <wa******@yahoo.com> wrote in message
news:d3**************************@posting.google.c om...
If I have a form, say FORM_FOO, and a form that it inherits from, say
FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do
I make FORM_FOO actually do true inheritance when I change BTN_RETURN
on FORM_BAR? In order to actually do that, I have to open every form
that inherits from FORM_BAR and remove the code manually from
InitializeComponents(). <Never mind the fact that it needs to be
checked in and out of source safe>. There MUST be a way to make it
actually work correctly.

Please help!
Thanks in advance,
~Patrick Corkum

Nov 22 '05 #2
Visual Studio 2003 is much better than 2002 in this
regards. 2002 put EVERYTHING in the InitializeComponent()
and any images in the .resx. However, since converting to
2003, I only have 2 lines of code:

this.BTN_RETURN.Name = "BTN_RETURN";
this.Controls.SetChildIndex(this.BTN_RETURN, 0);

Thanks,
~Patrick Corkum
-----Original Message-----
Hi Patrick

How are you changing the BTN_RETURN, and what exactly is the code that youhave to remove from the InitializeComponent() method?

Charles
"Patrick Corkum" <wa******@yahoo.com> wrote in message
news:d3**************************@posting.google. com...
If I have a form, say FORM_FOO, and a form that it inherits from, say FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do I make FORM_FOO actually do true inheritance when I change BTN_RETURN on FORM_BAR? In order to actually do that, I have to open every form that inherits from FORM_BAR and remove the code manually from InitializeComponents(). <Never mind the fact that it needs to be checked in and out of source safe>. There MUST be a way to make it actually work correctly.

Please help!
Thanks in advance,
~Patrick Corkum

.

Nov 22 '05 #3

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

Similar topics

2
by: Patrick Corkum | last post by:
If I have a form, say FORM_FOO, and a form that it inherits from, say FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do I make FORM_FOO actually do true inheritance when I...
1
by: Jason Hickey | last post by:
Has there been a change in the way the UI designer handles winform inheritance in the 2003 version of visual studio. Consider the following (try it if you are using 2003 Everything seems to work...
6
by: VR | last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages, my MasterPage does not have a form tag itself...
0
by: Javier Ros | last post by:
Hi, I´m using visual inheritance in WinForms and I have a problem with ToolStrip control. I have a Form called WndBase thah Inherit from Form. I have insert a ToolStrip in WndBase and I have...
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
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.