Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 User Control Inheritance (VB.NET)

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
ryusten Posted - Nov 17 2005 : 11:32:26 AM
I'm hoping someone here can help me with this. I have a windows form control that I've inherited from, specifically its the Panel object. My problem is that since the control is inherited it exposes all the normal properties/methods of the Panel object which I want to keep hidden. Aside from writing a custom class that contains an instance of a Panel object, is there a way I can "hide" all the properties/methods except the ones I want other developers to be able to use? Because right now its really silly for me to write my own delegate for the OnClick event handler if another developer can just access the Panel's native OnClick event :P
1   L A T E S T    R E P L I E S    (Newest First)
Struan Posted - Nov 17 2005 : 5:32:21 PM
The only way I know of to hide stuff is to use Shadows then make it private or friend.

  
Public Class Class1  
    Inherits Panel  
  
    Private Shadows Property BackColor() As Color  
        Get
  
        End Get
        Set(ByVal value As Color)  
  
        End Set
    End Property
  
End Class  
  


The BackColor property will be inaccessible/and not intellitexted to anyone else using the control.

VBGamer © Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.