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)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ryusten
Neophyte

8 Posts

Posted - Nov 17 2005 :  11:32:26 AM  Show Profile  Reply with Quote
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

Struan
Squire

21 Posts

Posted - Nov 17 2005 :  5:32:21 PM  Show Profile  Visit Struan's Homepage  Reply with Quote
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.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

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