Cambiar imagenes en tiempo de ejecución

Post Reply
gab_vg
Posts: 13
Joined: Wed Jan 23, 2008 11:20 pm
Location: Mexico

Cambiar imagenes en tiempo de ejecución

Post 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
gab_vg
Posts: 13
Joined: Wed Jan 23, 2008 11:20 pm
Location: Mexico

ups sorry about the languaje I didn't change to the spanishF

Post 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
gab_vg
Posts: 13
Joined: Wed Jan 23, 2008 11:20 pm
Location: Mexico

Enrico thankx

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply