[Gtk-sharp-list] resource file

underdog10@netcourrier.com underdog10@netcourrier.com
Fri, 30 Jul 2004 15:37:31 CEST


Thanks for your help.

I had your line and now i get this message:
resource must be a valid resource name of 'assembly'.

I am getting closer.

So i have in my resource file:
xbgmlogo=3Dxbgm.png

In the My windows Class:
ResourceManager rm;

In public MyWindow ():
rm =3D new ResourceManager(typeof(MyWindow));

then to access data:
Gdk.Pixbuf pixbuf =3D new Gdk.Pixbuf (null, =22xbgm.png=22);


Regards,
Kaya


----Message d'origine----
>Sujet: Re: =5BGtk-sharp-list=5D  resource file
>De: Fredrik Nilsson <jymdman=40home.se>
>A: underdog10=40netcourrier.com
>Copie =E0: gtk-sharp-list <gtk-sharp-list=40lists.ximian.com>
>Date: Fri, 30 Jul 2004 15:00:12 +0200
>
>On fre, 2004-07-30 at 13:07 +0000, wrote:
>> I had icons to my toolbar and i would like include all image in a resso=
urce file.
>> =

>> So i create the resource file and add my picture.
>> But how can i acces my picture.
>> =

>> I have done this, it does compile but i receved empty value.
>> =

>> In the My windows Class:
>> ResourceManager rm;
>> =

>> In public MyWindow ():
>> rm =3D new ResourceManager(typeof(MyWindow));
>> =

>> then to acces data:
>> (string) rm.GetObject(=22xbgm.png=22));
>> =

>> This compile but doesn't work.
>> =

>> Can anyone help me please?
>> Thanks for advaced.
>> =

>> Kaya
>> =

>
>Hi,
>
>You can use Gdk.Pixbuf to load the image from a resource file.
>
>Just use:
>
>Gdk.Pixbuf pixbuf =3D new Gdk.Pixbuf (null, =22xbgm.png=22);
>
>Add the image to Resource Files in monodevelop.
>
>/Fredrik
>
>

-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Tool=
bar...
Web/Wap : www.netcourrier.com
T=E9l=E9phone/Fax : 08 92 69 00 21 (0,34 =80 TTC/min)
Minitel: 3615 NETCOURRIER (0,16 =80 TTC/min)