由于需要,一些控件要自定义生成,
Label Lbl = new Label();
LblShelf.Controls.Add(Lbl);
我需要在这个控件添加一张图片,
b=new Bitmap("Image/tAqua.jpg");
Lbl.Image=b;
但是Image/tAqua.jpg这个图片文件无法编译到.DLL文件中,所以一旦使用这个控件的时候,就报错,System.ArgumentException: 使用了无效参数。
   at System.Drawing.Bitmap..ctor(String filename)现在想知道,如何才能Image/tAqua.jpg编译到DLL里,或者用其他方式来调用??

解决方案 »

  1.   

    ref:
    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=132585
      

  2.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=132585
    好像没有用啊,能不能提供一点简单得代码作为范例,谢谢各位大哥了!
      

  3.   

    里面不是有吗
    http://dev.csdn.net/develop/article/15/15571.shtm
      

  4.   

    http://dev.csdn.net/develop/article/15/15571.shtm
    我试过了,不是我要得。唉```````就没有另一种方式了?
      

  5.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=132585
    可以解决的