Adding existing component to toolbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MyMarlboro
    New Member
    • Mar 2008
    • 71

    Adding existing component to toolbox

    Hi,
    How to add existing component to toolbox?
    i right click my project say AAA and choose the existing component say ABC.cs and then i click ok. then ABC.cs is added to my project. But when i view the Toolbox on my left, i can't find the ABC component appear in the toolbox list?
    i am using Visual C# 2008
    Please guide.
    Thanks.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    If its a UserControl from a project that is part of your solution it should appear automatically AFTER YOU BUILD the solution. Its an oddity in VS. Actually build and run the project one time F5. After that it should show in your toolbox.

    Comment

    • MyMarlboro
      New Member
      • Mar 2008
      • 71

      #3
      the component is created by others. i just want to use the component thus i add it into my project. But after i add it.. i cant see it from the toolbox.
      is it some step that i missed?

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        Originally posted by MyMarlboro
        the component is created by others. i just want to use the component thus i add it into my project. But after i add it.. i cant see it from the toolbox.
        is it some step that i missed?
        Is this a commercial component that you bought? Or is this something a team member made?

        I don't understand why you added it to your project. If its a component you can just add it to the tool box and use it in all of your projects. Right-click on the tab that you want to add it to and select "Choose items..." then select the DLL of the component.

        You shouldn't be seeing a .cs file for something given to you as a component.

        Comment

        • MyMarlboro
          New Member
          • Mar 2008
          • 71

          #5
          it's non commercial component.

          e.g

          i wish to use his SnapShots.cs
          Could you please guide me the proper way to add the component?
          Thanks

          Comment

          • tlhintoq
            Recognized Expert Specialist
            • Mar 2008
            • 3532

            #6
            Originally posted by MyMarlboro
            it's non commercial component.

            e.g

            i wish to use his SnapShots.cs
            Could you please guide me the proper way to add the component?
            Thanks
            Nice control... but not something I can answer in a few minutes. Let me play with it a little and see what I can tell you.

            Comment

            • tlhintoq
              Recognized Expert Specialist
              • Mar 2008
              • 3532

              #7
              Did you notice that the SnapShots.cs component is part of the "VideoEdito r" namespace?

              Does that match the namespace of your project?

              Comment

              • MyMarlboro
                New Member
                • Mar 2008
                • 71

                #8
                Originally posted by tlhintoq
                Did you notice that the SnapShots.cs component is part of the "VideoEdito r" namespace?

                Does that match the namespace of your project?
                yup. i add using VideoEditor; inside my project. but it stil cant work.
                i dont know what and which step i missed.

                Comment

                • tlhintoq
                  Recognized Expert Specialist
                  • Mar 2008
                  • 3532

                  #9
                  yup. i add using VideoEditor; inside my project. but it stil cant work.
                  i dont know what and which step i missed.
                  Try changing the namespace of the component to match the namespace of your project. The toolbox still knows that control is not in the same namespace as your project.

                  Comment

                  • MyMarlboro
                    New Member
                    • Mar 2008
                    • 71

                    #10
                    Originally posted by tlhintoq
                    Try changing the namespace of the component to match the namespace of your project. The toolbox still knows that control is not in the same namespace as your project.
                    unfortunately.. it still not function for me.. does it works well for u?
                    thanks for your time

                    Comment

                    • tlhintoq
                      Recognized Expert Specialist
                      • Mar 2008
                      • 3532

                      #11
                      does it works well for u?
                      I wasn't going to spend hours trying to re-write half this project to make it a control. It is not a simple drag/drop thing.

                      SnapShot.cs references other classes such as "Frames" which is defined elsewhere in the project within the VideoEditor namespace.

                      You're going to first have to get all the referenced items into the same namespace as YOUR project. Simply dragging one file in, and adding a using statement isn't going to do it.

                      Comment

                      • MyMarlboro
                        New Member
                        • Mar 2008
                        • 71

                        #12
                        Originally posted by tlhintoq
                        I wasn't going to spend hours trying to re-write half this project to make it a control. It is not a simple drag/drop thing.

                        SnapShot.cs references other classes such as "Frames" which is defined elsewhere in the project within the VideoEditor namespace.

                        You're going to first have to get all the referenced items into the same namespace as YOUR project. Simply dragging one file in, and adding a using statement isn't going to do it.
                        i still unable to use the component. :(
                        i have a question... how do i edit the component myself; meaning.. i try to add in some feature for that component?
                        please guide

                        Comment

                        • tlhintoq
                          Recognized Expert Specialist
                          • Mar 2008
                          • 3532

                          #13
                          i have a question... how do i edit the component myself; meaning.. i try to add in some feature for that component?
                          please guide
                          Write code that gives you the features you want. (vague question gets a vague answer, sorry.

                          Comment

                          • MyMarlboro
                            New Member
                            • Mar 2008
                            • 71

                            #14
                            Originally posted by tlhintoq
                            Write code that gives you the features you want. (vague question gets a vague answer, sorry.
                            it's ok... thank you.

                            Comment

                            • MyMarlboro
                              New Member
                              • Mar 2008
                              • 71

                              #15
                              i changed the same namespace as my project for file e.g MediaPlayer.CS and SnapShots.cs.

                              But the component stil doesnt appear in the toolbox list.
                              Is anything else i missed??

                              Comment

                              Working...