Results 1 to 7 of 7

Thread: User Control question *RESOLVED*

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    User Control question *RESOLVED*

    Hi,

    I am trying to develop a user control (a customized combo box). I have got as far as coding a few simple sections (setting background colour, etc...) to see it working, but I can't figure out how to add a custom control to a form. Probably a real newbie question....! Do I have to do it through code? If so, will I see a sample of my control at the place I specify?

    I hope somebody can help me,
    Thanks in advance,
    DJ
    Last edited by DJ_Catboy; Nov 18th, 2003 at 03:33 AM.

  2. #2
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    If you are using VS.net to develop your control, add a blank form to your project. You control should be available via the toolbox in the my user controls section.
    "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

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Hi,

    Thanks for your help. However, I do not see a "My user controls" section! Is there somewhere that I need to "switch it on" ?

    DJ

  4. #4
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    Right click on the toolbox and select show all tabs.
    "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

  5. #5

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Hi,

    OK so this is getting a little bit frustrating! I did that but did not get a tab called "My User Controls". Just thought I would point out that i am running VS.NET 2002 - does that matter?

    Thanks for your help and apologies for being dumb!
    DJ

  6. #6
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    It may make a difference. I'm using 2003 and it is on my toolbox. Compile your user control. Click on the tools menu. Hopefully you will have Add/Remove toolbox Items listed there. Click it and add your control to the toolbox that way.
    "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

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Many thanks for your help. I have managed to sort it out now. For interest sake, you browse from the toolbox and then point to a .NET DLL (the compiled project with the user control in it) and then hey presto it appears!

    Thanks,
    DJ

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