Home > Net >  All winform project image resources as a class library, and then let the other library reference, th
All winform project image resources as a class library, and then let the other library reference, th

Time:12-10

1, when a library name ImgRescources, stored inside are image files, and image files are as the resources of the library
2, win1, win2 win3 is actually win procedures, now win1, win2, win3 reference the ImgRescources this library, but when the screen designer to choose
No ImgRescources resources inside, what method can be implemented?
Or do you have any other plan, can be packaged image resources and let the other project reference?

CodePudding user response:

Work, although the designer can not directly select the images, but does not affect the actual use, a handwritten.

 
XXX. Image=ImgRescources. Properties. Resources. XXXImage;


If there is a String is the need to share, then suggest the Image and the String can be divided into two Project, to generate the Assembly of two independent. Can be used for multiple projects.

CodePudding user response:

Packaged into a DLL can be alone,

CodePudding user response:

So it is better to put in SQLite

CodePudding user response:

The
reference 3 floor assky124 response:
such as well on the SQLite?

Put sqlite to replace, too, will be converted to binary?

CodePudding user response:

reference 1st floor bloodish response:
, designer, though cannot be directly select the images, but does not affect the actual use, a handwritten.

 
XXX. Image=ImgRescources. Properties. Resources. XXXImage;


If there is a String is the need to share, then suggest the Image and the String can be divided into two Project, to generate the Assembly of two independent. Can be used for multiple projects.

I tested that is ok, but when interface Settings can choose, not the trouble, interface Settings import resources also not line, if really it can also be forced to use

CodePudding user response:

Try the practice of 1st floor,

CodePudding user response:

See a scheme of stackoverflow, tried it on,

Access resources from a company's project using the designer in WinForms

1. Project resources, XXX. Resx
2. The other project, in the form of the link to add XXX. Resx,
3. Then you can directly choose the resource picture


CodePudding user response:

Received, thank god, I will try, thank you very much
  •  Tags:  
  • C#
  • Related