VC++ Express 2005 - Missing User Created Control project template

Under VC++ 2003 one could create a new custom control by using one of the standard supplied templates (i.e windows control library .net template)

However, this project template is not provided as an option for the VC++ 2005 Express edition - this is a real shame. Has any one manged a suitable workaround

 

 

 



Answer this question

VC++ Express 2005 - Missing User Created Control project template

  • luano

    Thanks for the posts.

    The methods describe do indeed work. Is it possible to save this as a new template.


  • GreenArms

    These are the steps required to turn your CLR application into a Class Library. The same result is achieved if you created a new CLR Class library project (then Add-> Windows Form).

    However, it is possible to create a user control if it resides in the same project as the exe (ie. you have the parent form, and in another file you have the user control). As long as that user control is only used in your exe project, it will work.

    Edit: I've just tested a exe-based user control in another exe. By adding a reference to the exe project, it actually works! So there isn't really a need to turn the control into a dll.

     



  • atypoli

    As a workaround, instead create a Windows Form. Then go to the code view and go to the line which says something like:

     public ref class Form1 : public System::Windows::Forms::Form

    change it to:

     public ref class Form1 : public System::Windows::Forms::UserControl

    then save and close all documents. It should be a user control now (remember, to use it in other projects, you have to build the control first).



  • Peter986

    The express editions have some limitations and hence try larger editions.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • wwlliiaamm

    BarrySo,

    Did you ever find a solution for saving that user control as a template I'm trying to do the same thing here.

    Thanks.



  • HOODEY

    HI That works, but a few more steps are nesessary.

    Not sure if i remeber all, but here's what i do remeber:

    - change application type to dll

    - remove entry point  _main

    -empty out the form1.cpp (or whatever it is called) except for the #include form1.h

    - change platfrom to not set, (there were some more settings which i changed to not set, but i think that not nesessary, i didn't try)

     

     


  • VC++ Express 2005 - Missing User Created Control project template