Page 1 of 1
Cambiar imagenes en tiempo de ejecución
Posted: Fri Oct 03, 2008 2:50 am
by gab_vg
Saludos y disculpen si es muy obvia esta pregunta p q ya tengo rato buscando en estos foros y no encontre nada asi es q o todo mundo sabe o nadie lo ha necesitado, pero yo si necesito saber como cambiar la imagen de un objeto boton BTNBMP o de un BITMAP pero en tiempo de ejecución. Mi objetivo es cambiar la imagen de uno de esos dos objetos desde un browse para actualizar la imagen de los productos cuando cambien de linea. Gracias
ups sorry about the languaje I didn't change to the spanishF
Posted: Fri Oct 03, 2008 2:55 am
by gab_vg
Well in case that someone can answer in spanish thanks, if not here is my cuestion in english. I need to change the image of an object ether BTNBMP or BITMAP but in execution time, Some one know how to do it?. That in order to use it from a browse to update the image of the products. Thankx
Re: ups sorry about the languaje I didn't change to the span
Posted: Fri Oct 03, 2008 7:48 am
by Enrico Maria Giordano
Use SetFile() method for BTNBMP and LoadImage() method for BITMAP.
EMG
Enrico thankx
Posted: Fri Oct 03, 2008 9:18 pm
by gab_vg
First thankx for quick answer Enrico and give the clue where search cuz my problem was that I din't understand how do reference to the objects but with your help and the samples it done.
cya
Posted: Fri Oct 03, 2008 10:38 pm
by Antonio Linares
Gab,
In fwppc\samples\Tutor10.prg you could modify it this way:
Code: Select all
@ 1, 1 LISTBOX oBrw ;
FIELDS If( Customer->Married, hBmp, hBmp2 ), Customer->Last, Customer->First ;
...
where hBmp2 is the handle of another bitmap
Posted: Fri Oct 03, 2008 10:41 pm
by Antonio Linares
If you mean to change the bitmap of a BITMAP object like in fwppc\samples\TestBmp.prg then you could do:
Code: Select all
oBmp:LoadBmp( CurDir() + "\another.bmp" )