Results 1 to 12 of 12

Thread: altering a standard control [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    altering a standard control [RESOLVED]

    How do you get into the control class of say, a text box and fix it so that it won't display "text box 1" every time you put a new one on the form?

    Am I the only one annoyed with this?
    Last edited by Andy; Mar 25th, 2004 at 10:16 PM.

  2. #2
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    http://msdn.microsoft.com/library/de...fccontrols.asp

    Here is a start. The sample is for a button but the same thing goes for any control you are inheriting from.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  3. #3
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you're going to inherit and create your own TextBox control just for this inconvenience , then it's aint worth it but it does if you're going to change functionality or its look .

  5. #5
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi Phantom,

    The MSDN link referrred to is, as was said by MasterBlaster, OK for a start, but I notice my reference book has 48 pages on the subject!!! (It's the core reference book by Francesco Balena aften refered to in this forum).


    By the way MasterBlaster, I hope your programming knowledge is a lot more accurate than your signature!!

    Although I suppose an alcohol diminished brain does churn our answers faster, 'cos it doesn't stop to think!!
    Last edited by taxes; Feb 17th, 2004 at 05:03 AM.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  6. #6
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    If you're going to inherit and create your own TextBox control just for this inconvenience , then it's aint worth it but it does if you're going to change functionality or its look .
    No Doubt. He didn't ask if it was worth it or not


    Originally posted by taxes
    Hi Phantom,

    The MSDN link referrred to is, as was said by MasterBlaster, OK for a start, but I notice my reference book has 48 pages on the subject!!! (It's the core reference book by Francesco Balena aften refered to in this forum).


    By the way MasterBlaster, I hope your programming knowledge is a lot more accurate than your signature!!

    Although I suppose an alcohol diminished brain does churn our answers faster, 'cos it doesn't stop to think!!
    Erm, My Signature is a joke, My programming knowledge is what I use to feed my family. Do not doubt for one second that I don't take that seriously.

    Yes, you are correct there are a lot cooler things about creating your own controls by inheriting from the standard .net ones. Dig around that area of msdn. There is plenty of info there to build some pretty sweet stuff.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by MasterBlaster
    No Doubt. He didn't ask if it was worth it or not
    I know that . You'll understand this when it comes to deployment stage .

  8. #8
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    Originally posted by Pirate
    I know that . You'll understand this when it comes to deployment stage .
    I'll understand what when it comes to deployment?
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by MasterBlaster
    I'll understand what when it comes to deployment?
    Adding the dll to the package , then if it's copied to the program folder it's possible for deletion by the user or if it's added to GAC , then it's hell annoying .

  10. #10
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    Ahhh. good. your just talking about the normal annoying stuff. I was praying there wasn't some new annoying stuff that was going to jump up and bite my arse.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    so there's no way to actually alter the ORIGINAL control, huh? that sucks. I get annoyed with small things like the name of the control in the new textbox, the fact that a label control is slightly to tall at first. I'm a nit-picker

  12. #12
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    There is . haven't you checked the links above ?

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