Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove usercontrol methods

Status
Not open for further replies.

sunaj

Technical User
Feb 13, 2001
1,474
DK
Hi,

I've made a usercontrol in vb.net (framework version 1.1) and it works as it is suposed. However, when I use it it it has a looong list of methods and properties that I have not defined and I would prefer to get rid of them (because I can never find the ones I have defined in the long list). How do I do that?

thx in advance


Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
declare a sub/function w/ the same name as the one you want to get rid of, except declare it:

Private Shadows [sub/function/property] [name]

-Rick

----------------------

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Hi Rick,

Thx for your anwser. That might work, but a quick count reveals that there are ~150 methods and properties and it would take me close to forever to dig up all the necessary information to do that.

e.g.
Code:
        Private Shadows Function AccessibilityObject() As System.Windows.Forms.AccessibleObject

        End Function
requires me to add a reference to accessibility.dll - to get rid of something that I don't need!

This must be a common problem, but I can't find anything on the web on similar questions - have I done something out of the ordinary to have ~150 properties and methods that I do not need on my usercontrol?

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Actually, it's not that common of a problem, you should just ignore the extra's for the most part. Everything inherits from object, which means every class will have .GetType and .ToString, by the time you get to a user control, you've inherited from atleast 3 classes. Those classes do all of the fundamental work for you (ie drawing the form, accepting input, events, etc)

-Rick

----------------------

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top