Results 1 to 6 of 6

Thread: Inherited Public Sub to a Private Sub

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    94

    Inherited Public Sub to a Private Sub

    I would like to know if there is a way to trash a sub that is inside a inherited class example:


    system.windows.forms.form has the 'Public Sub Show()'


    My Form will only be using the ShowDialog() sub.


    Is there a way to remove the sub show from my form so that it is not listed in the Intellisense and so that isn't part of my Form?
    If your post is resolved, mark it as such using the thread tools, Keep the forums tidy.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Why not just override it and throw an exception if it gets called?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780
    Look up the shadows declaration, it should cover you problem (hehe).

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    94
    Nope shadows still gives access to the original Sub from the form.


    If anyone knows how please and has a working example please share.
    If your post is resolved, mark it as such using the thread tools, Keep the forums tidy.

  5. #5
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by crptcblade
    Why not just override it and throw an exception if it gets called?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  6. #6
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Evad
    Nope shadows still gives access to the original Sub from the form.


    If anyone knows how please and has a working example please share.
    Shadows is basically like overrides.... I dont think you can do it
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width