C# adding a resource error and calling function

这一生的挚爱 提交于 2019-12-24 07:38:21

问题


Hey all i am new at C# and i am trying to add a resource to a .dll file.

It gives me the error of:

Error 1 Source file 'C:\Documents and Settings\Administrator\Local Settings\Application Data\Temporary Projects\bluRemoteProg\Resources\HIDLibrary.dll' could not be opened ('Unspecified error ') bluRemoteProg

What am i forgetting to do?

David

UPDATE

Got it working but how do i call a function from the form menu? I've tried:

PS3_BluMote.PS3RemoteDevice.Connect();

and

PS3_BluMote.PS3RemoteDevice.Connect();

but that does not seem to work...


回答1:


You can add a new project to your solution: e.g. YourApp.Engine as a C# Class Libraray project, then add your resources to that project (Double-click properties of YourApp.Engine project, and click Resources tab).

you can now use your DLL named YourApp.Engine everywhere in your app:

using YourApp.Engine;


来源:https://stackoverflow.com/questions/6742810/c-sharp-adding-a-resource-error-and-calling-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!