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
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to