FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with bitmaps - to Antonio
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Problem with bitmaps - to Antonio
Posted: Mon Apr 13, 2009 11:20 AM
Hello,

I have these codes, concerning bitmaps:
Code (fw): Select all Collapse
MsgInfo(FILE("..\BITMAPS\JUDA.BMP"))
MsgLogo("..\BITMAPS\JUDA.BMP",5)

Code (fw): Select all Collapse
MsgInfo(FILE("..\BITMAPS\CURRENT.BMP"))
DEFINE BUTTON OF oBAR FILE "..\BITMAPS\CURRENT.BMP" ACTION (EditDos("Update",1,.F.))

In both cases, the first lines results in a ".T.", which means that the file exist.
But in the second lines, the bitmaps don't appear on my screen. The button in the second case is working fine though.

It becomes more strange. Until now the problem only occurs if I use my application through Terminal Services on a Windows 2003 Server. The problem doesn't happen on a workstation until now.

I use FWH 9.04 and xHarbour Builder April 2009.

What is the reason for this problem ? Memory ?

Thanks a lot in advance for any help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Problem with bitmaps
Posted: Mon Apr 13, 2009 12:20 PM
In my Applications I don't work with ..\, because sometimes a file was not found.
Maybe in Your different situations, the BMP wasn't found.
On top of my Application, I define the Procect-path.

c_dir := GetModuleFilename(GetInstance(),"MYAPPLICATION.EXE" + CHR(0), 255)
c_path := left ( c_dir, rat( "\", c_dir) -1 )


That allways works :
myfile := c_path + "\FWHVERS.MEM"
myBMP := c_path + "\IMAGES\MyBMP.bmp"

Maybe it helps.

Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps
Posted: Mon Apr 13, 2009 12:36 PM

Uwe,

Thanks a lot for your help.

But I'm afraid that the cause of the problem is not to be found in the place of the bitmap.

As you can see in my example, I test the existance of the bitmap which always results into ".T.".

I use this function already for 10 years and I never had any problem.

Any idea ?

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 08:53 AM

Antonio,

Do you have any idea why this problem occurs ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 10:44 AM
Hello,
we also have 2 reports about disappearing bitmaps (TBtnBmp) after FWH and XHb upgrade but with bitmaps linked in from resource file. One of them on TS.

Customer's IT support was able to get bitmaps appearing after switching 16-bit colors to 32-bit in workstation Screen properties.

Can You check Your video card Color quality settings?

Best,
Taavi.



driessen wrote:Hello,

I have these codes, concerning bitmaps:
Code (fw): Select all Collapse
MsgInfo(FILE("..\BITMAPS\JUDA.BMP"))
MsgLogo("..\BITMAPS\JUDA.BMP",5)

Code (fw): Select all Collapse
MsgInfo(FILE("..\BITMAPS\CURRENT.BMP"))
DEFINE BUTTON OF oBAR FILE "..\BITMAPS\CURRENT.BMP" ACTION (EditDos("Update",1,.F.))

In both cases, the first lines results in a ".T.", which means that the file exist.
But in the second lines, the bitmaps don't appear on my screen. The button in the second case is working fine though.

It becomes more strange. Until now the problem only occurs if I use my application through Terminal Services on a Windows 2003 Server. The problem doesn't happen on a workstation until now.

I use FWH 9.04 and xHarbour Builder April 2009.

What is the reason for this problem ? Memory ?

Thanks a lot in advance for any help.
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 11:51 AM

Taavi,

Thanks a lot for your suggestion.

But I'm afraid that this is not the reason for my problem.

Meanwhile, I recompiled my application with FWH 9.03 and xHarbour Builder April 2009 and everything is OK now.

So, to my simple mind, the reason must be somewhere inside FWH 9.04.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 11:57 AM

Michel,

Could you please email me JUDA.BMP ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 01:09 PM

Antonio,

I'll send you "JUDA.BMP" and "CURRENT.BMP" by e-mail.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 05:19 PM
Michel,

We are going to review them.

In the meantime, would you mind to add this function to your main PRG and test it again ? thanks
Code (fw): Select all Collapse
function HasAlpha( hBmp )

return .F.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 06:26 PM
Hi,
in our tests setting desktop color quality to 16-bit makes bitmaps disappear with FWH 9.04.

Taavi



driessen wrote:Taavi,

Thanks a lot for your suggestion.

But I'm afraid that this is not the reason for my problem.

Meanwhile, I recompiled my application with FWH 9.03 and xHarbour Builder April 2009 and everything is OK now.

So, to my simple mind, the reason must be somewhere inside FWH 9.04.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 10:15 PM
Taavi,

We found what is going on:

HasAlpha() is failing under 16 bits colors resolution and is returning a wrong value, so they get managed as alpha bitmaps when they aren't.

We need to detect if we are under 16 bits colors and return false. We are working to improve HasAlpha() for this case.

In the meantime, please add this function to your main PRG. It should solve the problem:
Code (fw): Select all Collapse
function HasAlpha( hBmp )

return .F.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with bitmaps - to Antonio
Posted: Tue Apr 14, 2009 11:25 PM

Taavi, Michel,

We have just published a new FWH 9.04 build that provides an improved function HasAlpha().

Please download it. We appreciate your feedback, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps - to Antonio
Posted: Wed Apr 15, 2009 08:22 AM

Antonio,

Thanks a lot for your efforts.

I'll do the download followed by the necessary tests.

I'll let you know the results here.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem with bitmaps - to Antonio
Posted: Wed Apr 15, 2009 10:07 AM

Antonio, Taavi,

GOOD NEWS.

The problem seems to be solved. My bitmaps are shown again.

Thank you very much for your efforts.

Antonio, until now no problems with the TGET-class.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with bitmaps - to Antonio
Posted: Wed Apr 15, 2009 10:53 AM

Michel,

Glad to know it is working fine :-)

Many thanks for your feedback

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion