Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2007, 09:53 AM
digitiger digitiger is offline
Senior Member
 
Join Date: Jan 2001
Posts: 716
Default ghost like forms in Delphi application updated from ver4 to 7 in WinXP

I have just upgraded an old Delphi application from Delphi 4 to Delphi 7. Most of the things are normal but when this application is run on Windows XP in which windows appearance (through display properties-->Appearance) is set to Windows "XP Style" then all the panels and other classes drawn from custompanel become transparent. I mean their background color becomes null (though if I check the value of their property named "Color", it still shows the assigned color value but is not painted).

So supposing there is a panel whose color is set to green and whose font is set to White then at design time I see them properly but when I run the application, the panel is painted just like a bevel (empty rectangle with bevels) and things behind it become visible and above all its text is displayed in the font color.

I removed all the code from the main form and then ran it but it still remains ghost like.

there are about 500 units being used by this application.

When I extract the main form out of application and run it as part of a new fresh application (after removing all the code), then it work fine and all the panels are drawn with proper color, but when same form (without any code) is run as part of original application, it again appears like a ghost image.

I checked for initialization section in all the units but there is no initialization section in any of the units being used.

Has anyone faced any such issue in past? or Can anyone guess of something for which I need to check and fix?

Please help.

Thanks for your time and interest in this post.

Regards
Reply With Quote
  #2  
Old 09-27-2007, 09:54 AM
digitiger digitiger is offline
Senior Member
 
Join Date: Jan 2001
Posts: 716
Default RE: ghost like forms in Delphi application updated from ver4 to 7 in WinXP

just one more point, if I change the appearance (in display properties) from Windows XP Style to "Windows Classic Style" then every thing becomes normal.
Reply With Quote
  #3  
Old 09-27-2007, 01:11 PM
chris_w chris_w is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,397
Default RE: ghost like forms in Delphi application updated from ver4 to 7 in WinXP

[pre]
Known bug with TPanel's ParentBackground property not being
stored.

[/pre][DELPHI]
//in the form's OnCreate event
begin
Panel1.ParentBackground := FALSE;
Panel1.ParentBackground := TRUE;
Panel1.ParentBackground := FALSE;
end;

[/DELPHI][pre]
"There is a theory which states that if ever anybody discovers
exactly what the Universe is for and why it is here, it will
instantly disappear and be replaced by something even more
bizarre and inexplicable. There is another theory which states
that this has already happened."
-- Douglas Adams
[/pre]

Chris
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 07:36 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.