Demosthene, The way I got my picturebox to work is this
PictureBox1.Picture = Picture.Load("/usr/share/pixmaps/wicd/wicd-client.png") so if you could try changing your code to this: '------------------------------------------------------------------------------------------------------------------------------------------------------- PUBLIC SUB Button1_Click() DIM s1 AS String ="/home/user/Documents/Development/Gambas/Runes/sets/Elder Futhark/Algiz.png" DIM s2 AS String = "/home/user/Documents/Runes/set1/Raido.png" PictureBox1.Picture = Picture.Load(s1) 'load Algiz.png Message.Info("First Picture Loaded") KILL s1 'delete Algiz.png COPY s2 TO s1 'copy Raido.png and rename it to Algiz.png PictureBox1.Picture = Picture.Load(s1) 'load Algiz.png END '------------------------------------------------------------------------------------------------------------------------------------------------------- Logically it should work for you now. It works on my Gambas 2.16 on my Debian Lenny I Hope this helps Regards, Dimtiris 2010/1/25 Demosthenes Koptsis <demosthen...@gmail.com> > Hi i have a PictureBox and load a picture a.png > delete a.png > copy b.png as a.png to same place > load the new a.png (which is b.png only name is same as before) > > but PictureBox keeps the old image the first a.png! > > what am i doing wrong? > > try this code > > PUBLIC SUB Button1_Click() > > DIM s1 AS String = > "/home/user/Documents/Development/Gambas/Runes/sets/Elder > Futhark/Algiz.png" > DIM s2 AS String = "/home/user/Documents/Runes/set1/Raido.png" > > PictureBox1.Picture = Picture[s1] 'load Algiz.png > Message("pic1") > KILL s1 'delete Algiz.png > COPY s2 TO s1 'copy Raido.png and rename it to Algiz.png > PictureBox1.Refresh > PictureBox1.Picture = Picture[s1] '!!! Picture has not Raido the new copy > but keep the old Algiz > PictureBox1.Refresh > > END > > > > -- > > Γεια χαρα σε όλους!!! > > Regards, > > Demosthenes Koptsis > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user