Cambiar imagenes en tiempo de ejecución
Cambiar imagenes en tiempo de ejecución
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: ups sorry about the languaje I didn't change to the span
Use SetFile() method for BTNBMP and LoadImage() method for BITMAP.
EMG
EMG
Enrico thankx
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
cya
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Gab,
In fwppc\samples\Tutor10.prg you could modify it this way:
where hBmp2 is the handle of another bitmap
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 ;
...
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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" )