L
Lee
Visual Studio 2.0 / XP Professional with all service packs
Assume the appropriate Using directives.
The following statements work:
ComponentResourceManager resources = new
ComponentResourceManager(typeof(Resource1));
Bitmap ImageDown = new
Bitmap((Image)(resources.GetObject("ButtonDown")));
Bitmap ImageUp = new
Bitmap((Image)(resources.GetObject("ButtonUp"))));
but:
Bitmap ImageDown = new Bitmap(typeof(Resource1),
"ButtonDown");
throws an exception saying that "ButtonDown" cannot be found in class
'TOSExportClient.Resource1' ('TOSExportClient is the name of the dll).
Looking for the reason that the first form works and the second does
not.
Assume the appropriate Using directives.
The following statements work:
ComponentResourceManager resources = new
ComponentResourceManager(typeof(Resource1));
Bitmap ImageDown = new
Bitmap((Image)(resources.GetObject("ButtonDown")));
Bitmap ImageUp = new
Bitmap((Image)(resources.GetObject("ButtonUp"))));
but:
Bitmap ImageDown = new Bitmap(typeof(Resource1),
"ButtonDown");
throws an exception saying that "ButtonDown" cannot be found in class
'TOSExportClient.Resource1' ('TOSExportClient is the name of the dll).
Looking for the reason that the first form works and the second does
not.