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. C#
  4. Class Decleration

Class Decleration

Scheduled Pinned Locked Moved C#
helpquestion
4 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.
  • N Offline
    N Offline
    NazarHussain
    wrote on last edited by
    #1

    AoA I was working on a project. I want to discuss a question, is it possible that we override whole definition of existing class. Means e.g. I make my own class named TextBox. And it override the existing windows class. Whenever TextBox is written it supposed to be my class. We dont have to provide a whole path means. namespace.className. Please help me out if any one can. Thanks in advance.

    C 1 Reply Last reply
    0
    • N NazarHussain

      AoA I was working on a project. I want to discuss a question, is it possible that we override whole definition of existing class. Means e.g. I make my own class named TextBox. And it override the existing windows class. Whenever TextBox is written it supposed to be my class. We dont have to provide a whole path means. namespace.className. Please help me out if any one can. Thanks in advance.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      No, you can't do that, you can't make the entire project just magically use a class other than the one you actually used. The best you can do is a search and replace.

      Christian Graus Driven to the arms of OSX by Vista.

      N 1 Reply Last reply
      0
      • C Christian Graus

        No, you can't do that, you can't make the entire project just magically use a class other than the one you actually used. The best you can do is a search and replace.

        Christian Graus Driven to the arms of OSX by Vista.

        N Offline
        N Offline
        NazarHussain
        wrote on last edited by
        #3

        yes i understand your suggestion. My requirement is i want to paint all controls by myself. I searched the net and find a way that can be possible is Hooks. But i can not find exact Paint Messages of each control. Can you help me in it. and Thanks for your reply of previous question.

        C 1 Reply Last reply
        0
        • N NazarHussain

          yes i understand your suggestion. My requirement is i want to paint all controls by myself. I searched the net and find a way that can be possible is Hooks. But i can not find exact Paint Messages of each control. Can you help me in it. and Thanks for your reply of previous question.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Hooks do not do what you hope to do. The most likely thing is a using statement at the top of every class which redefines the TextBox, for example, as being an object called TextBox in your namespace instead of the usual one.

          Christian Graus Driven to the arms of OSX by Vista.

          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