Click here to Skip to main content
11,931,104 members (57,838 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB ActiveX User-controls VB.NET , +
Dear all
I am creating a numerical text box control and named it NumTextbox, but when I create an object from it, I saw the UserControl events in the object with my custom events, so I want to prevent the object to inherits the UserControl events, methods and properties, I want it to inherits my own only.
Can anybody help me please?
Posted 3-Dec-11 7:50am
Edited 3-Dec-11 15:55pm
Eduard Lu 3-Dec-11 20:56pm
EDIT: added code block

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use the sealed modifier (as described here[^]) in your custom control.
fadi77_net 3-Dec-11 13:25pm
Sorry, but I am programmer
Eduard Lu 3-Dec-11 20:57pm
Then use NotInheritable instead?
fadi77_net 4-Dec-11 2:08am
I don't want to use NotInheritable ( or Sealed (C#) key words, because if you have class A, and class B that inherited from A but it is NotInderitable, that means no class can be inherited form B.
That is not what I want, I want to prevent the developer to see the UserControl events, properties or methods when he is in view code editor (the events combobox in code editor). I want to display my own events only, not the UserControl events.
Did you got my idea?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 3 Dec 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100