Resources, where to put them, and how to reference them in C#

后端 未结 4 1403
日久生厌
日久生厌 2020-12-15 07:49

I\'ve worked with C# and other programming languages for a while now, and am ashamed to say I\'m unfamiliar with the standard on where to put resources such as program icons

4条回答
  •  温柔的废话
    2020-12-15 08:20

    You can always do it this way.

    Go to Project-->Project properties(always name of project + properties)-->Resources

    On the upper menu bar you will find a combo box where you will select which type of element you want to use as a resource.

    Example: If you need to change the icon for the form(the one that appears an the upper left side of the form) you will then to upload a ".ico" file. If you need to insert a button image you must upload a ".png" file. You can see this Resx files tutorial youtube video where it's explained perfectly

    Once you have done this you select the control you wish to insert the image in and go to Properties-->Image and the select the image you have just added from Project Resource file option.

提交回复
热议问题