473,404 Members | 2,174 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,404 software developers and data experts.

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 2320
* 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
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
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
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
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
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
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
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
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
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
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
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
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.