Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. wat is subclassing and how is it used?

wat is subclassing and how is it used?

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gpa2000
    wrote on last edited by
    #1

    Why should i use subclassing? I am not sure what it is for or how it is used. do you know where i can find an article about this subject? Thnx, Grtz, Guus

    M 1 Reply Last reply
    0
    • G gpa2000

      Why should i use subclassing? I am not sure what it is for or how it is used. do you know where i can find an article about this subject? Thnx, Grtz, Guus

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hi there. Subclassing is the act of deriving a new class by inheriting from an existing class. You would do this if you wanted to take advantage of functionality in the base class and add functionality of your own. For example, let's say you want a text box for your windows forms application, but one that accepts only numbers and ignores other characters typed from the keyboard. In most ways, you want your text box to behave just like a regular text box; you just want the additional functionality that limits keyboard entry to numbers only. You could create a subclass of the TextBox class by inheriting it, then override keyboard handling methods to insure that only numbers are allowed.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups