473,513 Members | 13,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UserControl inheritting from Button

Hi,

how can i make a usercontrol that inherits from the
system.windows.forms.button instead of the forms.usercontrol ?

I want to add a fiew features to my button and still be able to drag it
on to the form with the ide

i got working code, just a class that inherits from
system.windows.forms.button but then i need to do all the design by code
[
dim b as new mybutton
me.controls.add(b)
....
]
So i want to be able to make it a usercontrol... but still have all
standard button-properties (& add a fiew of my own)

thx

Nov 20 '05 #1
3 2326
* sotto <ju**@sotto.invalid> scripsit:
how can i make a usercontrol that inherits from the
system.windows.forms.button instead of the forms.usercontrol ?


You cannot create a usercontrol inheriting from button. You can inherit
a control from button:

\\\
Public Class MyButton
Inherits Button

Nov 20 '05 #2
Hi sotto,

If you've changed the inheritence then I assume you're having trouble with
it showing up in the toolbox? Well, to "get around" this, simply build your
application then alter the toolbox, right click then "Add/Remove Items..."
and choose Browse. Then select the application you've just compiled. The
button control will show up in the list and you can drag it around till your
heart's content.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
"sotto" <ju**@sotto.invalid> wrote in message
news:0L********************@hestia.telenet-ops.be...
Hi,

how can i make a usercontrol that inherits from the
system.windows.forms.button instead of the forms.usercontrol ?

I want to add a fiew features to my button and still be able to drag it
on to the form with the ide

i got working code, just a class that inherits from
system.windows.forms.button but then i need to do all the design by code
[
dim b as new mybutton
me.controls.add(b)
...
]
So i want to be able to make it a usercontrol... but still have all
standard button-properties (& add a fiew of my own)

thx

Nov 20 '05 #3
Thx folks ...

i got it working

greetz sotto
--
Merry christmas !!!

Nov 20 '05 #4

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

Similar topics

5
11516
by: C. Alexander | last post by:
I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of. The client/server needs to load a transparent layer for each user...
2
2651
by: bill yeager | last post by:
When trying to run my web project, I get the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the...
1
239
by: sotto | last post by:
Hi, how can i make a usercontrol that inherits from the system.windows.forms.button instead of the forms.usercontrol ? I want to add a fiew features to my button and still be able to drag it...
0
2449
by: Matthew | last post by:
All, I have searched google and the newsgroups but can't find anything the same as what I am experiencing (though I may have missed something). I have controls (textboxes) within UserControls...
1
6824
by: Will Gillen | last post by:
I know this has probably been asked before, but I can't seem to find a solid answer in any of the archives. First, before my question, please forgive my limited knowledge of the event lifecycle...
41
4240
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
0
2078
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
10
2398
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
1
18803
by: =?Utf-8?B?S3lsZSBNLiBCdXJucw==?= | last post by:
I have a set of controls and logic that must be invoked from several pages within a web application as a popup dialog, so I intend to use a userControl contained in a panel extended with the...
0
1015
by: Nariban Barkan | last post by:
Hi All, I have two UserControls, KK1 and EFT1. Each one has one ScriptManagerProxy and one UpdatePanel . in addition to these, on first control (KK1) there is one button. on second control...
0
7254
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
7153
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
7432
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
7094
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
7519
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
5677
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,...
0
4743
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
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
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.