Results 1 to 4 of 4

Thread: cant overload the dispose method of a picturebox

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    cant overload the dispose method of a picturebox

    I have a class which inherits from PictureBox. I want to overload the Dispose sub, but I can't.
    VB Code:
    1. Public Overloads Overrides Sub Dispose()
    2.     End Sub


    when I run my app, it gives me this error:
    An unhandled exception of type 'System.TypeLoadException' occurred in Paint Mall.exe

    Additional information: Declaration referenced in a method implementation can not be a final method. Type: PaintMall.Ruler. Assembly: Dispose.


    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!!

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Overrides Overloads Protected Sub Dispose(ByVal disposing As Boolean)

    That is what the MSDN library has for it.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hey it worked, thanks!
    what is that disposing boolean passed to the sub? what's the point
    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!!

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmm, when I'm accessing my control from the Form, I see it as Dispose() , while it's declared as Dispose(boolean) in the control. Why is it? is it because of the protected keyword?
    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