Ask a questionAsk a question
 

Answerdefault properties for each components

  • Friday, October 23, 2009 4:20 AMnoobhacker Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi
    when i create a new project,i need to set the form's properties to fixsingle,no maximize button,no icons,etc 
    and the button, i need to change the flat style to system to get fade effect on vista/7

    is there anyway to change the default properties for each components?

    or VS don't have this function? if it doesnt have,i hope it will add into VS next time 

    thanks 

Answers

  • Saturday, October 24, 2009 12:57 AMDeborahKMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    For the form, you can build an item template using Visual Studio. This makes it easier to reuse the form in any project.

    Open the project containing the form set with the desired properties. Select File | Export Template and then select Item template from the Export Template wizard. Pick your form. Complete the rest of the wizard to finish the template. Your project item template is then listed in the Add New Item dialog whenever you add a new project item to your project.

    See this for details:

    http://msdn.microsoft.com/en-us/library/tsyyf0yh.aspx

    For the button, you can build your own button control inheriting from the built-in button control and set its default properties.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!

All Replies

  • Saturday, October 24, 2009 12:57 AMDeborahKMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    For the form, you can build an item template using Visual Studio. This makes it easier to reuse the form in any project.

    Open the project containing the form set with the desired properties. Select File | Export Template and then select Item template from the Export Template wizard. Pick your form. Complete the rest of the wizard to finish the template. Your project item template is then listed in the Add New Item dialog whenever you add a new project item to your project.

    See this for details:

    http://msdn.microsoft.com/en-us/library/tsyyf0yh.aspx

    For the button, you can build your own button control inheriting from the built-in button control and set its default properties.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
  • Thursday, October 29, 2009 5:14 AMnoobhacker Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    thank you.
    it sloves my problem