简体   繁体   中英

Imported icon vs resource icon

What is the difference between importing icon images directly to the control, or include them as resources, in a Windows Form application? What are the advantages of each approach?

If you put icon directly to control, then icon will be saved directly to .resx file of form.

If you using icon from Resource then control using only reference to resource. if you using same icon directly to control N times, then size of file of form(yourform.resx) will be more then you use only reference to same icon from resource

Embedded

File saved directly to yourProject.resx file.

External

File added to project folder and .resx file keep only a path to the file

MSDN Adding and Editing Resources

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM