Results 1 to 9 of 9

Thread: New Component Naming problem

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2012
    Posts
    40

    New Component Naming problem

    I created a new control which inherits the TextBox. When I add the custom control I get this Code.

    Me.ctxtSubPrice = New MyProject.NumericTextBox(Me.components)

    If I remove the "MyProject." it works great.

    Me.ctxtSubPrice = New NumericTextBox(Me.components)

    The problem is when I compile the project or open the designer is goes back to

    Me.ctxtSubPrice = New MyProject.NumericTextBox(Me.components)

    The component file is name NumericTextBox.vb and its in the root directory of the project.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: New Component Naming problem

    Ok, so you say that when you remove that, it works great. Are we then to assume that when you don't remove that, it doesn't work great? What happens?
    My usual boring signature: Nothing

  3. #3
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: New Component Naming problem

    When I add the custom control I get this Code.
    Get? What does that actually mean? Where's it coming from? How are you 'adding' it?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2012
    Posts
    40

    Re: New Component Naming problem

    I created the component which is a NumericTextbox. I used a component class. Then I compiled the project. After that I had a blue geared control called NumericTextBox in my toolbox. Then I dragged it in my form. I end up with the error posted above.

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: New Component Naming problem

    I don't see the error. What am I missing?
    My usual boring signature: Nothing

  6. #6
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: New Component Naming problem

    I used a component class.
    Say what now? What's one of them?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  7. #7
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: New Component Naming problem

    Quote Originally Posted by dunfiddlin View Post
    Say what now? What's one of them?
    Code:
    Inherits Component

  8. #8
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: New Component Naming problem

    Quote Originally Posted by .paul. View Post
    Code:
    Inherits Component
    Oh, ok! Why would you do that if you were just making a custom textbox by inheriting the standard textbox? Have I been missing out?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  9. #9

    Thread Starter
    Member
    Join Date
    Aug 2012
    Posts
    40

    Re: New Component Naming problem

    I figured it out. I made it a new project and compiled it as a dll and referenced it to my project

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