FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RibbonBar PNG image disappear
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
RibbonBar PNG image disappear
Posted: Thu May 16, 2013 09:41 AM

Good morning
I have a RibbonBar with 8 or 10 images in PNG files (not Resources).
There are times when I run the application shows all other times if.
Appear all but one or two.
Even not always the same image.
Why might this be?
I appreciate any help
thanks

Buenos dias
Tengo un RibbonBar con 8 o 10 imagenes en ficheros PNG (No Recursos).
Hay veces que al ejecutar la aplicaci贸n no me aparecen todos y otras veces si.
Aparecen todos menos 1 o 2.
Incluso no siempre es la misma imagen.
A qu茅 puede ser debido?
Agradezco cualquier ayuda
Gracias

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 10:31 AM
Cristobal,

I have used the FWH RibbonBars designer (FWH\samples\rbdesign.prg) to create this quick example and it is workings fine here:

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "ribbon.ch"

function BuildRibbonBar()

   local oRBar, oGr1_1, oBtn1_1_1, oBtn2_1_1, oBtn3_1_1, oBtn4_1_1, oBtn5_1_1, oBtn6_1_1, oBtn7_1_1
   local oWnd
   
   DEFINE WINDOW oWnd

   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT  "One", "Two", "Three" HEIGHT 134 TOPMARGIN 25

   ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 600 GRADIANT { { 0.1, RGB( 218, 229, 243 ), RGB( 218, 229, 243 ) }, { 0.9, RGB( 199, 216, 237 ), RGB( 218, 229, 243 ) } }

   @ 3, 3 ADD BUTTON  oBtn1_1_1 PROMPT "new" BITMAP "C:\fwh\bitmaps\pngs\image1.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 83 ADD BUTTON  oBtn2_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image2.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 163 ADD BUTTON  oBtn3_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image3.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 243 ADD BUTTON  oBtn4_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image4.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 323 ADD BUTTON  oBtn5_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image5.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 403 ADD BUTTON  oBtn6_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image6.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 483 ADD BUTTON  oBtn7_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image7.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 02:23 PM

I have seen this type of thing when memory is low due to a memory leak. The next time it happens try rebooting to see if the problem goes away.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 02:45 PM

Cristobal,

What FWH version are you using ?

There was a nasty dissapearing bitmaps bug that was recently fixed. Maybe your version does not include such fix

viewtopic.php?p=140014#p140014

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 03:11 PM

Antonio
Version 12.03

El enlace que escribes tambien soluciona para archivos PNG?
Sigo investigando
Gracias

Anthony
Version 12.03

The link also resolved to write PNG files?
I'm still investigating
thanks

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 03:34 PM

Cristobal,

It was fixed in FWH 13.02.

The code for the fix is in my above link, so you could try to implement it and see if that makes a difference :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 04:15 PM
Antonio Linares wrote:Cristobal,

It was fixed in FWH 13.02.

The code for the fix is in my above link, so you could try to implement it and see if that makes a difference :-)


Antonio, I added at the end of the application the code shown in the link you've written and keeps going. Although no error message appears.
I've added in the application or must be changed in some kind?
thanks

Antonio, he a帽adido al final de la aplicacion el codigo que aparece en el enlace que has escrito y sigue pasando. Aunque no aparece ningun mensaje de error.
Lo he a帽adido en la aplicacion o hay que cambiarlo en alguna clase?
Gracias
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 05:05 PM

Cristobal,

Please place this call in the code of the modified C function to check if it is used or not:

MessageBox( 0, "ok", "called", 0 );

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 05:32 PM
Antonio Linares wrote:Cristobal,

Please place this call in the code of the modified C function to check if it is used or not:

MessageBox( 0, "ok", "called", 0 );


Antonio
No aparece el mensaje
Donde he de situarlo?

Gracias y un saludo

No message appears
Where I have to place it?

Thanks and regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 05:40 PM

Cristobal,

Mas sencillo: A帽ade esta funci贸n a tu aplicaci贸n y dime si afecta a como se ve la ribbonbar:

function TransBmp()

return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RibbonBar PNG image disappear
Posted: Thu May 16, 2013 10:23 PM
Antonio Linares wrote:Cristobal,

Mas sencillo: A帽ade esta funci贸n a tu aplicaci贸n y dime si afecta a como se ve la ribbonbar:

function TransBmp()

return nil


Antonio
Asi funciona mucho mejor y falla mucho menos que antes.
Gracias de nuevo por tu tiempo
Saludos

So it works much better and gives a lot less than before.
Thanks again for your time
regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion