none
如何将资源文件写入DLL并在VB.NET中调用? RRS feed

  • 问题

  • 我现在有一个VB.NET写的ConsoleApplication,当中调用了2.mp3文件。现在我想把2.mp3文件用VB.NET封装成DLL并且还是在这个Application里调用并起到同样的效果。我该怎么做呢? 就是如何封装和如何调用的问题。 最好有实例啊  不只是mp3文件 是不是所有类型的文件封装进DLL都是同样的方法? 求给为大神予以解答。 谢谢
    2013年10月25日 14:19

答案

  • >>如何封装

    可以直接把MP3文件拖拽到你的DLL项目中,然后属性选择“嵌入资源”。

    >>如何读取

    参考我的博文:http://www.cnblogs.com/ServiceboyNew/archive/2012/02/29/2372979.html


    Click For donating:Free Rice For the poor
    For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
    For more things to talk about? StackOverFlow is your choice.

    2013年10月27日 8:42
    版主
  • 你应该用反编译工具查看嵌入的资源,找到其Namespace等,然后按照我的方法做。

    Click For donating:Free Rice For the poor
    For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
    For more things to talk about? StackOverFlow is your choice.

    2013年10月27日 9:27
    版主

全部回复

  • >>如何封装

    可以直接把MP3文件拖拽到你的DLL项目中,然后属性选择“嵌入资源”。

    >>如何读取

    参考我的博文:http://www.cnblogs.com/ServiceboyNew/archive/2012/02/29/2372979.html


    Click For donating:Free Rice For the poor
    For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
    For more things to talk about? StackOverFlow is your choice.

    2013年10月27日 8:42
    版主
  • 谢谢  原来这篇blog是您写的 之前看过但没搞懂 我再研究研究
    2013年10月27日 9:16
  • 你应该用反编译工具查看嵌入的资源,找到其Namespace等,然后按照我的方法做。

    Click For donating:Free Rice For the poor
    For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
    For more things to talk about? StackOverFlow is your choice.

    2013年10月27日 9:27
    版主