[DUG] Image transparency and the Hotfix poltergeist

Alister Christie alister at salespartner.co.nz
Fri Mar 2 10:15:20 NZDT 2007


Probem 1:
The TXPManifest  is just a dummy component - if you look at its source

  TXPManifest = class(TComponent)
  end;

You'll notice that it doesn't have much functionality.  The only purpose 
of the component is it gives you an easy way of including the XPMan unit 
in your application - as it will be added automatically when you add the 
component.  The reverse is not true however, when you remove the 
component the unit is not removed from your application - you have to do 
that manually to disable XP theming.

The actual theme information is stored in WindowsXP.res and if you look 
at this file with a resource editor you will see that it contains
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
      type="win32"
    name="DelphiApplication"
    version="1.0.0.0"
      processorArchitecture="*"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        publicKeyToken="6595b64144ccf1df"
        language="*"
        processorArchitecture="*"/>
    </dependentAssembly>
  </dependency>
</assembly>
Which tells windows to theme the controls.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington 



John Bird wrote:
> Sometimes an image is transparent, sometimes not - unpredictable!
>
> Before you look at this first problem, look below to the Hotfix problem 2
> below.  I think that was the underlying cause...
>
>
> [
> Problem 1 - I have some round LED image bitmaps, I store in a TimageList,
> and assign to a Timage when I want.
>
> The images are BMP's with a square white background around a round image,
> and set to transparent so the white background does not show.
>
> The problem is - Mostly transparency works - no white background, but
> sometimes the white background shows.
>
> Any ideas?
>
> D2006, I have XP Manifest on the form.  Is this related to the other
> transparency problem related a few days ago with labels? The only other idea
> I had is that the images are not exactly square - 62x63 pixels, and the
> Timage is 64x64 - but I fixed that and it still does not work
> consistently...
>
> This is the code in case I am doing something silly ... LEDStatus is the
> index into the ImageList1
>
>   if HawkStatus<>LEDStatus then
>   begin
>     LEDStatus:=HawkStatus;
>     ImageStatus.Picture:=nil;
>     imagelist1.GetBitmap(LEDStatus,imageStatus.picture.bitmap);
>     ImageStatus.Transparent:=true;  //in case lost
>     Application.ProcessMessages;
>   end;
>
> Actually about 2 hours later after further investigation the story gets
> weirder.
>
> I tried deleting the TXPManifest.  It didn't make a difference.  HOWEVER nor
> did the buttons revert to non XP buttons.....
> It looks like that a project cannot have the XPManifest deleted....there was
> no trace in the source, but the DCU still refers to a XPMan, even though the
> component has gone. And the buttons etc are XP ones. The XP Manifest
> poltergeist is in the house!
>
> If I reboot and run the program outside the IDE it seems to behaves
> consistently properly as faras the images go.
> Inside the IDE is the inconsistency.
>
>
> [Problem 2 - 
>
> Now today I installed Hotfix 10 (BDS2006HotFixRollup2) as I saw it was there
> on the Borland site.
> (I installed the previous Hotfix (1-9) in October last year.)
>
> Is this the source of the problem?
>
> I installed the hotfix without the IDE running, and since then have had some
> real crashes when exiting BDS:
>
> Like:
>
> Access Violation at address 20C707A0 in module 'coreide100.bpl', read of
> address 000000A4.
>
> Then:  Exception EinvalidPointer on module rtl100.bpl at 00006581.  Invalid
> pointer operation
>
> Followed by the MS message BDS has had to close - tell Microsoft about this
> problem?
>
> After 4 or 5 such crashes and reboots it seems to have stabilised, and is
> now not crashing.
>
> Also the IDE now starts and exits spectacularly faster than before - 20
> seconds startup as opposed to between 1 and 2 minutes  (2 minutes when I
> first got it).
>
> -AND- the problems with the transparent form also have gone away.  For now.
>
> The IDE no longer seems haunted by gremlins bent on causing me to lose 4
> hours chasing phantom problems.....
>
> Anyone else had such oddities with the Hotfix?
>
> And just what have they changed????  It all seemed to be minor stuff to do
> with international characters and some BDS 2006 Help issues according to the
> release notes....
>
>     *  bugs related to unicode characters and Korean characters
>     * many fixes related to the WSDL importer and SOAP support
>     * length limitations on search paths
>     * problems with the F1 key on the form designer
>     * COM\ActiveX menu items and wizards in the Professional version
>
> John
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>   


More information about the Delphi mailing list