Thread: User Controls

  1. #1
    Registered User
    Join Date
    Aug 2009

    User Controls


    I wanted to create a custom control in Visual Studio, and then add it as a component to a Windows Form. So, I added a new "User Control" to the project, and edited it by dragging and dropping buttons, labels etc. Then, I want to be able to add this control to a form.

    I've been told that I needed to build the project, and then add the .dll for the control to the toolbox items. So, I built the project, and then did Tools->Choose Toolbox Items. Here, I browsed through my project directory, and found the .exe for the project, which was found in MyProject\Debug. After this, my user control appeared in the list of toolbox items, with a gear wheel symbol next to it.

    So, I then dragged this user control into my Windows form, but the control does not actually appear on the form. It doesn't give me any errors when I drag and drop, but the control is not added to the window, and does not appear in the source code for the form.

    So I have done something thing I notice is that I added the .exe for the project (MyProject\Debug\MyProject.exe) rather than a .dll for the user control, which is what I was looking for - but couldn't find one anywhere, despite having built the entire project.

    Any ideas?? Thanks!

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    just a guess. you may have to export the resource code from your visual resource editor and manually past that code in to your program. the same way i had to with the borland resource visual editor. meow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help managing user input
    By JayDiddums10 in forum C Programming
    Replies: 2
    Last Post: 11-19-2006, 05:01 PM
  2. placing user controls in a form...
    By AngKar in forum C# Programming
    Replies: 2
    Last Post: 07-21-2006, 04:02 PM
  3. pass error before char
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 03-26-2006, 12:00 PM
  4. ~ User Input script help~
    By indy in forum C Programming
    Replies: 4
    Last Post: 12-02-2003, 06:01 AM
  5. Stopping a user from typeing.
    By knave in forum C++ Programming
    Replies: 4
    Last Post: 09-10-2001, 12:21 PM