Problem with bitmaps - to Antonio

Problem with bitmaps - to Antonio

Postby driessen » Mon Apr 13, 2009 11:20 am

Hello,

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

Code: Select all  Expand view
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.
Last edited by driessen on Tue Apr 14, 2009 8:53 am, edited 1 time in total.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps

Postby ukoenig » 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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problem with bitmaps

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

Postby driessen » Tue Apr 14, 2009 8: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

Postby Taavi » 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: Select all  Expand view
MsgInfo(FILE("..\BITMAPS\JUDA.BMP"))
MsgLogo("..\BITMAPS\JUDA.BMP",5)

Code: Select all  Expand view
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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: Problem with bitmaps - to Antonio

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

Postby Antonio Linares » Tue Apr 14, 2009 11:57 am

Michel,

Could you please email me JUDA.BMP ? thanks
regards, saludos

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

Re: Problem with bitmaps - to Antonio

Postby driessen » Tue Apr 14, 2009 1: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

Postby Antonio Linares » Tue Apr 14, 2009 5: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: Select all  Expand view

function HasAlpha( hBmp )

return .F.
 
regards, saludos

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

Re: Problem with bitmaps - to Antonio

Postby Taavi » Tue Apr 14, 2009 6: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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: Problem with bitmaps - to Antonio

Postby Antonio Linares » 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: Select all  Expand view

function HasAlpha( hBmp )

return .F.
 
regards, saludos

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

Re: Problem with bitmaps - to Antonio

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

Re: Problem with bitmaps - to Antonio

Postby driessen » Wed Apr 15, 2009 8: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with bitmaps - to Antonio

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests