Set same icon for all my Forms

前端 未结 8 1533
一向
一向 2020-12-08 19:31

Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your project

8条回答
  •  旧时难觅i
    2020-12-08 19:54

    I'm not sure if the MS VS designer can deal with Forms that don't derive directly from Form. If not then you may try to copy the main form's icon to all other forms: for each form in Forms collection

    form.icon = MainFrom.Icon
    

    Or perhaps in each Form's _Loaded event:

    Icon = MainFrom.Icon
    

提交回复
热议问题