Set same icon for all my Forms

前端 未结 8 1510
一向
一向 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条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 20:07

    1. In the project properties > Application > Icon and Manifest > browse for a *.ico file and add it there.

    2. In the constructor or _Load event of a Form, simply add:

      this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
      

提交回复
热议问题